<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 - libclang has no registered targets after r371787"
   href="https://bugs.llvm.org/show_bug.cgi?id=45809">45809</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>libclang has no registered targets after r371787
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>10.0
          </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>libclang
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>jkorous@apple.com, klimek@google.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>45309
          </td>
        </tr></table>
      <p>
        <div>
        <pre>After r371787 [0], when Rust's bindgen uses libclang, it fails with "no targets
are registered" [1].

This only happens when we build LLVM with `-DLLVM_LINK_LLVM_DYLIB=ON`.

jkorous: I'm not clear on why `LLVMSupport` was added to libclang's
CMakeLists.txt. If I remove that line, the code still compiles, and this bug
goes away. I'm not familiar with this part of the code though -- do you have
any idea what might be going on?

[0] <a href="https://reviews.llvm.org/rL371787">https://reviews.llvm.org/rL371787</a>
[1]
<a href="https://github.com/llvm/llvm-project/blob/2946cd701067404b99c39fb29dc9c74bd7193eb3/llvm/lib/Support/TargetRegistry.cpp#L66">https://github.com/llvm/llvm-project/blob/2946cd701067404b99c39fb29dc9c74bd7193eb3/llvm/lib/Support/TargetRegistry.cpp#L66</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_NEW "
   title="NEW - [meta] 10.0.1 Release Blockers"
   href="https://bugs.llvm.org/show_bug.cgi?id=45309">Bug 45309</a>] [meta] 10.0.1 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>