<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 - Building llvm 13 - Cross Compile - clang-ast-debug Exec format error"
   href="https://bugs.llvm.org/show_bug.cgi?id=52091">52091</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Building llvm 13 - Cross Compile - clang-ast-debug Exec format error
          </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>normal
          </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>lancethepants@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I'm cross-compiling clang, lld and ldb for an arm32 cpu. I previously
cross-compiled clang 12.0.1, and am now trying to now compile clang 13.

I first compile the requisite tools llvm-tblgen, clang-tblgen and lldb-tblgen
for the build system and then make sure to pass those to the cmake invocations
LLVM_TABLEGEN, CLANG_TABLEGEN LLDB_TABLEGEN so it knows where to find them when
needed in cross compilation.

With llvm 13 I'm now getting the error "clang-ast-dump: Exec format error". It
is attempting to run the cross-compiled 'clang-ast-dump' which of course won't
run on the build system.  I built the host version of 'clang-ast-dump' but I
can't see any cmake variable to tell it the location of the build system's
'clang-ast-dump'.  I attempted putting it ahead in the PATH but it doesn't
automatically pick it up that way.

Am I looking over a variable to pass this to cmake, or is there something I can
disable so it does not require 'clang-ast-dump'? I just want the c/c++
compiler, lld and ldb.

thanks,

Lance Fredrickson</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>