Closed Bug 1469088 Opened 6 years ago Closed 6 years ago

--enable-lto is too opinionated

Categories

(Firefox Build System :: General, enhancement)

3 Branch
enhancement
Not set
normal

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

The code added in bug 1457482 is too opinionated, forcing -fuse-ld=lld when the compiler is clang, and implying --enable-linker=lld. This effectively prevents from doing lto on mac cross builds using the option (which is more desirable than setting C/CXXFLAGS)
Blocks: 1469091
Depends on: 1457168
Depends on: 1473436
Assignee: nobody → mh+mozilla
Blocks: macOS-LTO
No longer blocks: macOS-PGO
Comment on attachment 8989902 [details] Bug 1469088 - Relax the assumptions of --enable-lto, and make it work for macOS builds. https://reviewboard.mozilla.org/r/254898/#review262300 ::: commit-message-fbb6d:15 (Diff revision 1) > +to: > +- work on macOS, which it currently doesn't, and add support for the mac > + linker (ld64), which, unfortunately, doesn't have a clean way to be > + detected, so work around that. > +- default to lld if no linker was explicitly given and the compiler is > + clang *and* the build target is not macOS. This doesn't seem to describe what you've implemented precisely, in that your conditional is these three things *and* lto is enabled. ::: build/moz.configure/toolchain.configure:1633 (Diff revision 1) > - cmd_output = check_cmd_output(*cmd, onerror=lambda: None) > - if cmd_output is None: > + # ld64 doesn't have anything to print out a version. It does print out > + # "ld64: For information on command line options please use 'man ld'." > + # but that would require doing two attempts, one with --version, that > + # would fail, and another with --help. > + # Instead, abuse its LD_PRINT_OPTIONS feature to detect a message > + # specific to it on stderr when it fails to process --version. This is a clever hack. :)
Attachment #8989902 - Flags: review+
Attachment #8989902 - Flags: review?(core-build-config-reviews)
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/e8c173a632a4 Relax the assumptions of --enable-lto, and make it work for macOS builds. r=ted
Attachment #8989902 - Flags: review?(core-build-config-reviews)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: