<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - Debug info much larger with clang than with gcc"
   href="http://llvm.org/bugs/show_bug.cgi?id=15889">15889</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Debug info much larger with clang than with gcc
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mh+llvm@glandium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>echristo@gmail.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=10451" name="attach_10451" title="Preprocessed source (compressed)">attachment 10451</a> <a href="attachment.cgi?id=10451&action=edit" title="Preprocessed source (compressed)">[details]</a></span>
Preprocessed source (compressed)

I've built a relatively recent mozilla-central based Firefox, and the libxul.so
file is greater than 3GB when built with clang (3.2 from debian experimental),
while the same code built with gcc 4.7.2 (from debian unstable) generates a
file slightly smaller than 1GB.

Interestingly, the size of all debug info sections (but not relocations) in
object files in the gcc-built tree adds up to about 1.8GB, vs. 2.8GB in the
clang-built tree (and yes, the linked file has a bigger debug info data than
the sum of all objects, including those that are not in that linked file (I
didn't discriminate)). Remarkably, some objects have smaller debug info in the
clang-tree.

I'm attaching here the (preprocessed) source file that causes the biggest
difference between objects built from gcc and clang. Fortunately, it's also
reasonably small (fwvo reasonable). Please tell me if you need more (like the
object files), but I've been able to reproduce with clang -O2 -g vs. gcc -O2 -g
(that is, outside the mozilla build system, with just these flags). gcc's debug
info is about 2k overall, while it is 10k for clang.

I don't know if it makes sense to attach more such files (I have a complete
list of the size differences, there are ~2000 files, over the ~6000 total that
are bigger with clang, ~1500 of which are 50% bigger or more)</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>