mingw clang builds don't handle delayload correctly
Categories
(Firefox Build System :: General: Unsupported Platforms, defect)
Tracking
(firefox-esr6870+ fixed, firefox70 fixed)
People
(Reporter: jacek, Assigned: tjr)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
jcristau
:
approval-mozilla-esr68+
|
Details |
I noticed that clang builds don't handle delayload correctly. They pass delayload flag to the linker like: -DELAYLOAD:crypt32.dll. This is not the right way. It happens to not cause an error because it's treated just like any other -D argument (so it's like #define). lld-link supports delay loading, so changing that to use -Wl,-Xlink=-delayload:crypt32.dll should be enough to get it right.
Assignee | ||
Comment 1•5 years ago
|
||
Interesting. I can fix this up easily I expect but now I'm curious what the purpose of this is...
Reporter | ||
Comment 2•5 years ago
|
||
Usual reasons for delay loading is faster load time and saving resources in cases when libraries are not really used in runtime. I've seen cases where the code may be sensitive to such subtle differences (although it wasn't Mozilla code base), so since clang-cl uses delay load, it's safer to use it in clang builds as well.
Anyway, it's not really important, but nice to have.
Reporter | ||
Comment 3•5 years ago
|
||
LLVM now supports nicer command line support:
https://reviews.llvm.org/D65728
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
To use the new command line syntax I'd have to backport a patch to clang and this is much simpler. This look good to you Jacek?
Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=022fa2fe098615dcd98b6e415d39e5c1c3d26bb9 (ignore the Fission failures)
Assignee | ||
Comment 7•5 years ago
|
||
[Tracking Requested - why for this release]: Only affects the mingw build; would be nice to put in ESR for Tor.
Assignee | ||
Comment 8•5 years ago
|
||
Comment on attachment 9088147 [details]
Bug 1570597 - Pass the -delayload flag to lld correctly for MinGW builds r?#build
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is a small performance improvement on browser start time that would be good to give to Tor.
- User impact if declined: Tor would either need to carry the patch or be a little slower.
- Fix Landed on Version: 70
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Only affects the MinGW build.
- String or UUID changes made by this patch:
Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/59422c064fd1
Pass the -delayload flag to lld correctly for MinGW builds r=firefox-build-system-reviewers,mshal
Comment 10•5 years ago
|
||
bugherder |
Comment 11•5 years ago
|
||
Comment on attachment 9088147 [details]
Bug 1570597 - Pass the -delayload flag to lld correctly for MinGW builds r?#build
build improvement for mingw, approved for 68.2.
Comment 12•5 years ago
|
||
bugherder uplift |
Updated•5 years ago
|
Description
•