[llvm-bugs] [Bug 35512] New: Size of built debug-mode binaries is enormous

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Dec 3 23:39:04 PST 2017


https://bugs.llvm.org/show_bug.cgi?id=35512

            Bug ID: 35512
           Summary: Size of built debug-mode binaries is enormous
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: codeman.consulting at gmail.com
                CC: llvm-bugs at lists.llvm.org

This may be something to do with any number of things other than CMake, but
that's what I'm generating the build scripts with so I'm putting this here for
now...   the size of llvm binaries has somehow become enormous on Ubuntu. 
Here's Clang, for example: 

-rwxr-xr-x 1 root root 1824M Dec  3 22:42 /usr/local/bin/clang-6.0

LLVM binaries have never been exactly small in debug mode, but this looks new
to me.  Is there some type of dwarf generation issue or flag I can use to
prevent this?   As of now make followed by make install on an 80GB VM disk
(which had always been enough for quick builds and is nearly unused otherwise)
almost filled the disk starting from having 70GB free.  strip -g on clang-6.0
reduced this size to: 

-rwxr-xr-x 1 root root 299M Dec  3 23:29 /usr/local/bin/clang-6.0

Which is still rather enormous although acceptable, but defeats the purpose of
a debug build in the first place.  I thought I built this as a shared library
version, but it seems to just link in all the debug info from the static libs
anyway which also defeats the purpose of that.  

Is there some flag or trick I'm missing to keep the debug info from inflating
size this much?  Can it be produced externally with some flag or another? 
Build was with a relatively recent GCC, it built debug by default with make
-j8.  Those file sizes also limit the ability to run VM disks from regular hard
drives because the disk activity is the limiting factor, hence the small VM
disk size on a fast SSD to keep up. 

Is this even normal?  

I'm marking as an enhancement because if there's something we can add to CMake
to help stop this behavior?  Am I missing a flag somewhere?  My windows release
build ended up with a 50M clang++.exe with the same targets (ALL), and RTTI and
EH turned on in addition to that, so this seems to be something more linux
specific or I'm forgetting something.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171204/4e870dbd/attachment.html>


More information about the llvm-bugs mailing list