<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 - LTO failure with mixed DWARF version metadata"
   href="https://bugs.llvm.org/show_bug.cgi?id=44784">44784</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LTO failure with mixed DWARF version metadata
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dmajor@mozilla.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dblaikie@gmail.com, froydnj@gmail.com, htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>44555
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While testing the 10.0 release branch, we ran into the following situation:

* We use rustc 1.39 (based on LLVM 9) to build (with LTO) some Rust code, and
the resulting object file has a piece of metadata saying the DWARF version is 2
and the behavior is `llvm::Module::Warning`.

* We use clang 10 to build (with LTO) some C++ code, and the resulting object
file has a piece of metadata saying the DWARF version is 4 and the behavior is
`llvm::Module::Max`, because of the change in [1].

(I don't know why we have mismatched DWARF versions.)

* When we link the objects together, previously we would just get a bunch of
warning spam, but now we fail with an LTO error because of the mismatch in
behaviors [2].

@dblaikie: Is this scenario expected to be supported? From my reading of the
changeset, it sounds like the desired behavior would be to upgrade to the
higher version, and perhaps warn, but not fail the build. So maybe the
mismatched-behaviors check is too aggressive in this case. But correct me if
I've misunderstood the intent. Or maybe it's our fault for using mixed LLVM
versions.

[1]
<a href="https://github.com/llvm/llvm-project/commit/e956952edec140d2475aa7c8cbe20fbdd3320634">https://github.com/llvm/llvm-project/commit/e956952edec140d2475aa7c8cbe20fbdd3320634</a>
[2]
<a href="https://github.com/llvm/llvm-project/blob/d8117542ac57f6051674ca70ea14c0e0d7d9b046/llvm/lib/Linker/IRMover.cpp#L1280">https://github.com/llvm/llvm-project/blob/d8117542ac57f6051674ca70ea14c0e0d7d9b046/llvm/lib/Linker/IRMover.cpp#L1280</a></pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_CONFIRMED "
   title="CONFIRMED - [meta] 10.0.0 Release Blockers"
   href="https://bugs.llvm.org/show_bug.cgi?id=44555">Bug 44555</a>] [meta] 10.0.0 Release Blockers
              </li>
          </ul>
        </div>
        <br>

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

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