Closed Bug 1422368 Opened 7 years ago Closed 6 years ago

Work around a clang-cl bug in yuv_row_win.cpp: unresolved symbol kCoefficientsRgbY

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox59 --- fixed
firefox61 --- fixed

People

(Reporter: away, Assigned: away)

References

Details

Attachments

(3 files)

Assignee: nobody → dmajor
Attachment #8933731 - Flags: review?(jmuizelaar)
Attachment #8933731 - Attachment is patch: true
Attachment #8933731 - Flags: review?(jmuizelaar) → review+
Keywords: checkin-needed
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1355b9f0cfc1
Work around a clang-cl bug in yuv_row_win.cpp. r=jrmuizel
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1355b9f0cfc1
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
This patch didn't actually fix it, but David has an updated patch that does.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla59 → ---
Yeah... the problem isn't one of discarding symbols, it's that the names referenced by inline asm don't get mangled. 

I suspect what happened was:
1. My try push got unresolved externals without the patch
2. My try push failed somewhere else with the patch
3. I assumed #2 was a later failure and thus the patch was successful.

Sorry about that.
Attached patch updated patchSplinter Review
As I mentioned, this is David's patch, I just happen to be the one who verified it on Try :)
Attachment #8935033 - Flags: review?(jmuizelaar)
Attachment #8935033 - Flags: review?(jmuizelaar) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5f90362bbc80
Work around a clang-cl complilation bug in yuv_row_win.cpp harder. r=jrmuizel
Backed out for Windows static bustage (unresolved externals):

https://hg.mozilla.org/integration/mozilla-inbound/rev/d0b7abcecda9598ee7d383ac71b27087b6a7afc3

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=5f90362bbc80cf7f9b09e41477c244f292fc9f1c&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=150239136&repo=mozilla-inbound

18:12:54     INFO -      StaticXULComponentsEnd\StaticXULComponentsEnd.obj
18:12:54     INFO -     Creating library xul.lib and object xul.exp
18:12:54     INFO -  yuv_row_win.obj : error LNK2019: unresolved external symbol __kCoefficientsRgbY referenced in function _FastConvertYUVToRGB32Row_SSE
18:12:54     INFO -  xul.dll : fatal error LNK1120: 1 unresolved externals
18:12:54     INFO -  z:/build/build/src/config/rules.mk:699: recipe for target 'xul.dll' failed
Flags: needinfo?(dmajor)
Flags: needinfo?(dmajor) → needinfo?(ryanvm)
Yeah, I'll re-land it with bug 1423307 once it gets r+.
Flags: needinfo?(ryanvm)
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/43410f74d526
Work around a clang-cl complilation bug in yuv_row_win.cpp harder. r=jrmuizel
https://hg.mozilla.org/mozilla-central/rev/43410f74d526
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
...aaaaaand these fixes still weren't enough. ThinLTO builds still have a nullptr value for this symbol.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Backout by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/737b602f4c6f
Backed out fixes because they weren't sufficient.
I give up on trying to hack around this inline asm bug.

I propose that we switch Win32 clang-cl to the intrinsics-based versions of these functions from the Win64 code. It means we'll miss out on some of the handwritten specializations like DoubleYUVToRGB32Row_SSE, but if Win64 got away with that, then it can't be so bad.

(If this lands, we can back out the earlier fix)
Attachment #8964408 - Flags: review?(jmuizelaar)
(In reply to Pulsebot from comment #14)
> Backout by dmajor@mozilla.com:
> https://hg.mozilla.org/integration/mozilla-inbound/rev/737b602f4c6f
> Backed out fixes because they weren't sufficient.

Pulsebot didn't mention that I immediately backed out the above backout, because I don't want to break people's existing clang-cl builds while I revisit the fix. I wasn't thinking, sorry!
Comment on attachment 8964408 [details] [diff] [review]
Use the intrinsics from the Win64 file

Review of attachment 8964408 [details] [diff] [review]:
-----------------------------------------------------------------

Sure. Maybe we could use the gcc style inline assembly?
Attachment #8964408 - Flags: review?(jmuizelaar) → review+
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8a463b11e241
Use intrinsics-based YUV functions from Win64 under Win32 clang-cl. r=jrmuizel
https://hg.mozilla.org/mozilla-central/rev/8a463b11e241
Status: REOPENED → RESOLVED
Closed: 7 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: mozilla59 → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: