Closed
Bug 638149
Opened 14 years ago
Closed 14 years ago
Need a way to disable -dead_strip on OS X
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla5
People
(Reporter: espindola, Assigned: espindola)
References
Details
(Whiteboard: fixed-in-bs)
Attachments
(1 file, 2 obsolete files)
6.33 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
The current OS X linker crashes if using both LTO and -dead_strip, so we need a way to disable -dead_strip.
Comment 1•14 years ago
|
||
I'd rather not add more configure options. Can you just detect that you're using LTO and not use dead strip in that case?
Assignee | ||
Comment 2•14 years ago
|
||
Not sure if in a reliable way. There are many ways to enable it. With clang you can use -O4, -flto or -emit-llvm. GCC has -flto and I think -fwhopr. For clang the most reliable is probably to test the type of file the compiler produces, but gcc uses native files with extra sections containing the IL. Should I just ignore newer GCCs on OS X for now? Another option would be adding a test that crashes -dead_strip, but I never managed to get a small enough test to include in a configure. I will also try xcode 4 to see if that linker is fixed. If it is, it might not be worth it to add the option.
Assignee | ||
Comment 4•14 years ago
|
||
This patch adds a macro for checking for LTO and uses that to disable -dead_stip. It currently only handles LLVM based compilers, but could be extended if anyone is interested in trying gcc.
Attachment #516302 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Attachment #516506 -
Flags: review?(ted.mielczarek)
Comment 5•14 years ago
|
||
Comment on attachment 516506 [details] [diff] [review] alternative patch Funky, but sounds ok. Can we call it MOZ_LLVM_LTO_ENABLED or something like that? MOZ_CHECK_LLVM_LTO ? Also, is there an existing autoconf macro to get the assembly output from a compile? I guess it's hard to say since we're using such an ancient autoconf...
Attachment #516506 -
Flags: review?(ted.mielczarek) → review+
Updated•14 years ago
|
Assignee: nobody → respindola
Assignee | ||
Comment 6•14 years ago
|
||
This is avoiding a bug in the linker, so I assume it could also hit gcc's lto. In which case they just have to extend this macro. I can only do copy-and-paste programming with m4, so I don't know if there is an autoconf macro available, but I didn't notice one in the existing configure source code.
Comment 8•14 years ago
|
||
I landed this on cedar <http://hg.mozilla.org/projects/cedar/rev/eb6edf77b7c8> but had to back it out immediately <http://hg.mozilla.org/projects/cedar/rev/224477bd4b3c> because it breaks the builds. http://tinderbox.mozilla.org/showlog.cgi?log=Cedar/1301253927.1301254046.2775.gz
Whiteboard: not-ready
Assignee | ||
Comment 9•14 years ago
|
||
Sorry, the previous patch was missing a change to js/src/aclocal.m4
Attachment #516506 -
Attachment is obsolete: true
Attachment #523933 -
Flags: review?(ted.mielczarek)
Updated•14 years ago
|
Attachment #523933 -
Flags: review?(ted.mielczarek) → review+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Whiteboard: not-ready
Comment 11•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/f858cc85724a
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.2
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•