[llvm-bugs] [Bug 35512] New: Size of built debug-mode binaries is enormous
llvm-bugs at lists.llvm.org
Sun Dec 3 23:39:04 PST 2017
Bug ID: 35512
Summary: Size of built debug-mode binaries is enormous
Product: Build scripts
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...
More information about the llvm-bugs