Closed
Bug 300047
Opened 19 years ago
Closed 19 years ago
Use -dead_strip as a linker flag for mac builds
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bryner, Assigned: bryner)
References
Details
Attachments
(1 file, 1 obsolete file)
720 bytes,
patch
|
mikepinkerton
:
review+
|
Details | Diff | Splinter Review |
-dead_strip works similarly to MSVC's /OPT:REF in that it discards all functions and data which are not reachable from the exported functions of a binary. This allows us to strip out some of the "extra" constructors and destructors that are emitted for classes, as well as functions that are just never called. In my test, this yields a couple hundred KB savings for a static firefox-bin.
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #188638 -
Flags: review?(pinkerton)
Comment 2•19 years ago
|
||
Comment on attachment 188638 [details] [diff] [review] patch looks good, can we add this to camino's LD_FLAGS somewhere? or is it a checkbox we can flip in the project?
Attachment #188638 -
Flags: review?(pinkerton) → review+
Comment 3•19 years ago
|
||
What does this do to C++ static ctors/dtors? We still have a few in the code.
Assignee | ||
Comment 4•19 years ago
|
||
No idea.
Comment 5•19 years ago
|
||
Let's get this in at the beginning of the gecko 1.8b4 cycle.
Assignee | ||
Comment 6•19 years ago
|
||
Comment on attachment 188638 [details] [diff] [review] patch I'd like to get this in after 1.1a2.
Attachment #188638 -
Flags: approval1.8b4?
Updated•19 years ago
|
Attachment #188638 -
Flags: approval1.8b4? → approval1.8b4+
Assignee | ||
Comment 7•19 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 8•19 years ago
|
||
What are the effects on code size? Also, did anyopne figure out comment #3?
Comment 9•19 years ago
|
||
Some tinderboxen have older toolchains that don't know about -dead_strip. This should be backed out until the tinders are ready. Adjusting blocking.
Assignee | ||
Comment 10•19 years ago
|
||
Check that the linker flag is supported before enabling it
Attachment #188638 -
Attachment is obsolete: true
Attachment #189251 -
Flags: review?(joshmoz)
Comment 11•19 years ago
|
||
(In reply to comment #8) > What are the effects on code size? My optimized builds shrank from 24.4MB to 23.7MB with this patch. A nice result, and no problems in my limited testing so far. (I built with -Os, disabled SVG/canvas/mathml)
Comment 12•19 years ago
|
||
Comment on attachment 189251 [details] [diff] [review] patch with configure check r=pink
Attachment #189251 -
Flags: review?(joshmoz) → review+
Assignee | ||
Comment 13•19 years ago
|
||
checked in. note that atlantia, which does firefox nightlies, has new enough build tools to support this option.
Status: REOPENED → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•