Closed
      
        Bug 300947
      
      
        Opened 20 years ago
          Closed 19 years ago
      
        
    
  
Use ld -dead_strip for Camino 
    Categories
(Camino Graveyard :: General, enhancement)
Tracking
(Not tracked)
        RESOLVED
        FIXED
        
    
  
        
            Camino1.0
        
    
  
People
(Reporter: sugar.waffle, Assigned: mark)
References
Details
(Keywords: fixed1.8.0.2, fixed1.8.1)
Attachments
(1 file)
| 1.35 KB,
          patch         | sfraser_bugs
:
              
              review+ mikepinkerton
:
              
              superreview+ | Details | Diff | Splinter Review | 
Strip is not executed in build of Camino now. 
And "-dead_strip" to which Fix is done with bug300047 is not executed in build
of Camino. 
If strip is done with Camino of a dynamic link, it becomes the following sizes. 
$ls -l Camino.app/Contents/MacOS/Camino 
-rwxr-xr-x  1 sek  sek  937992 16  7 01:45 Camino.app/Contents/MacOS/Camino*
$strip Camino.app/Contents/MacOS/Camino 
$ls -l Camino.app/Contents/MacOS/Camino 
-rwxr-xr-x  1 sek  sek  755808 16  7 04:09 Camino.app/Contents/MacOS/Camino*
| Comment 1•20 years ago
           | ||
We want to keep some symbols so that stack traces are intelligible.
(In reply to comment #1)
> We want to keep some symbols so that stack traces are intelligible.
In official build, the "--enable-strip" option is not specified. 
But I think that it should do "--enable-strip" when this option is specified
with mozconfig. 
| Assignee | ||
| Comment 3•20 years ago
           | ||
This should be as simple as adding DEAD_CODE_STRIPPING to the build settings. 
Possibly also PRESERVE_DEAD_CODE_INITS_AND_TERMS, which maps to ld
-no_dead_strip_inits_and_terms.  The core didn't take that option, although
maybe it should have?  Time will tell.
Downrev (<1.5) Xcodes should ignore the settings, but I just upgraded my last
1.1 installation to 1.5 so I can't test it easily.
As Simon said, we can't just strip outright in DeploymentSymbols or Development.
 Deployment should already be symbol-stripped, although not dead-stripped.
Assignee: pinkerton → mark
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
| Updated•20 years ago
           | 
Summary: strip the code size of Camino. → Use ld -dead_strip for Camino
|   | ||
| Comment 4•20 years ago
           | ||
How about those of us who are doing our own custom builds and don't really give
a crap about stack traces? ;) If someone can point me toward a coherent tutorial
for doing this, I'm all ears. Figuratively, of course.
cl
| Assignee | ||
| Comment 5•20 years ago
           | ||
This seems to drop 1.5MB from the static executable and 0.5MB from the download
package.  I'm not pushing it on anyone (yet).
|   | ||
| Comment 6•20 years ago
           | ||
Mark, is this something we should include in 1.0? It seems a drop in download size is a Good Thing(tm).
| Assignee | ||
| Comment 7•20 years ago
           | ||
The toolchain on the system that produces official builds isn't new enough to support -dead_strip.  If it looks like there's a chance at getting that upgraded soon, we can think about this for 1.0.
|   | ||
| Comment 8•20 years ago
           | ||
Based on comment 7, I'm targeting for 1.0, however, this will probably get pushed to 1.1 as I doubt the systems will get upgraded before then.
Target Milestone: --- → Camino1.0
| Assignee | ||
| Comment 10•19 years ago
           | ||
We should do this to alleviate some of the weight burden of universal packages.  I'll dust this patch off and retest.
| Assignee | ||
| Comment 11•19 years ago
           | ||
(Whatever hypothetical build system produces a universal will support DEAD_CODE_STRIPPING.)
| Assignee | ||
| Comment 12•19 years ago
           | ||
Comment on attachment 189509 [details] [diff] [review]
Strip dead code from non-debug builds
Still applies, still works.
When -Wl,-dead_strip (DEAD_CODE_STRIPPING) alone is on, and when it is on in conjunction with -Wl,-no_dead_strip_inits_and_terms (PRESERVE_DEAD_CODE_INITS_AND_TERMS), byte-for-byte identical output is produced.
-Wl,-dead_strip is currently enabled in the core where the build tools support it, and non-Xcode-built apps are fully linked with dead code stripping.  (Bug 300047.)  No problems reported there.
The numbers I quoted in comment 5 may have been relative to no dead stripping in the core.  Still, this will save some additional space, but the numbers I just did show that this change alone will only be worth about 200kB in a universal dmg.
This shouldn't affect pre-Xcode 1.5 builds.
        Attachment #189509 -
        Flags: superreview?(mikepinkerton)
        Attachment #189509 -
        Flags: review?(sfraser_bugs)
| Updated•19 years ago
           | 
        Attachment #189509 -
        Flags: review?(sfraser_bugs) → review+
|   | ||
| Comment 13•19 years ago
           | ||
Comment on attachment 189509 [details] [diff] [review]
Strip dead code from non-debug builds
sr=pink
        Attachment #189509 -
        Flags: superreview?(mikepinkerton) → superreview+
| Assignee | ||
| Comment 14•19 years ago
           | ||
Checked in on trunk, 1_8, and 1_8_0.  The tools on the machines that currently produce official nightlies aren't new enough for this to make a difference.
Status: NEW → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.0.2, 
          
            fixed1.8.1
Resolution: --- → FIXED
Target Milestone: Camino1.1 → Camino1.0
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•