<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Size of built debug-mode binaries is enormous"
   href="https://bugs.llvm.org/show_bug.cgi?id=35512">35512</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Size of built debug-mode binaries is enormous
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>cmake
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>codeman.consulting@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>