Closed
Bug 1448980
Opened 7 years ago
Closed 6 years ago
Add an --enable-thinlto (or similar) for Windows
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox63 fixed)
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: away, Assigned: away)
References
Details
Attachments
(2 files)
1.86 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
2.39 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
When set, this flag should:
* Complain if the linker is not lld-link
* Add -flto=thin to MOZ_OPTIMIZE_FLAGS (probably want to coordinate with bug 1448978)
* Add -FORCE to LDFLAGS until bug 1448976 is addressed
* Change AR and to llvm-lib, and add -llvmlibthin to AR_FLAGS
* Maybe? change HOST_AR to llvm-lib. It seems like we shouldn't need this but I needed it to make my build work. I didn't need to change HOST_AR_FLAGS.
(In reply to David Major [:dmajor] from comment #1)
> And possibly also add -OPT:LLDLTO=3 to LDFLAGS.
But be careful with Spidermonkey builds:
LINK : fatal error LNK1117: syntax error in option 'OPT:LLDLTO=3'
Comment 3•7 years ago
|
||
Something like --enable-lto=thin would probably be better.
Comment 5•7 years ago
|
||
tjr is working on getting LTO or ThinLTO working with clang builds on Linux as a prerequisite to making clang CFI work, so it'd be great if we could make this work there as well.
I wrote this just to help me understand the next patch better
Assignee: nobody → dmajor
Attachment #8992012 -
Flags: review?(core-build-config-reviews)
Attachment #8992013 -
Flags: review?(core-build-config-reviews)
Updated•6 years ago
|
Attachment #8992012 -
Flags: review?(core-build-config-reviews) → review+
Comment 8•6 years ago
|
||
Comment on attachment 8992013 [details] [diff] [review]
Make --enable-lto work with clang-cl
Review of attachment 8992013 [details] [diff] [review]:
-----------------------------------------------------------------
Not a huge fan of the massive amount of indentation here, but oh well. r=me with the change below.
::: build/moz.configure/toolchain.configure
@@ +1332,3 @@
>
> + if value:
> + enabled = "1"
Can we not just make this `True`, and add_old_configure_assignment will DTRT? Assigning "1" is...weird.
Attachment #8992013 -
Flags: review?(core-build-config-reviews) → review+
> Can we not just make this `True`, and add_old_configure_assignment will
> DTRT? Assigning "1" is...weird.
Sounds good to me. I didn't know add_old_configure_assignment could do that. I was just refactoring the existing "1" code.
Comment 10•6 years ago
|
||
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/34a44432715b
prequel: Rename LTO `flags` to `cflags`. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/a2ae515ee43f
Make --enable-lto work with clang-cl. r=froydnj
Comment 11•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/34a44432715b
https://hg.mozilla.org/mozilla-central/rev/a2ae515ee43f
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•6 years ago
|
Version: Version 3 → 3 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•