<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/61886>61886</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            help-needed - Cross-compiling: Building native clang-tblgen, llvm-tblgen and llvm-config
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          th0ma7
      </td>
    </tr>
</table>

<pre>
    Summary: help needed to reduce build time of native tools.

Prior to cross-compiling I'm first building native `clang-tblgen`, `llvm-tblgen` and `llvm-config` then defining `LLVM_TOOLS_BINARY_DIR`, `LLVM_CONFIG`, `LLVM_TABLEGEN`, `CLANG_TABLEGEN` so tools are available when cross-compiling.

Overall things is working out fairly well.  Question is, can I reduce the native build time by building only the tools and not needing to build clang entirely?

So far I used `-DHOST_LLVM_MAKE_OPTS='llvm-tblgen llvm-config'` which reduced build from 3500+ down to 2300 ninja items to be build.  But still `clang-tblgen` isn't being built unless I use `-DLLVM_ENABLE_PROJECTS='clang'`.  I've also tried manually going into the `build` directory with hope of building `clang/utils/TableGen`, `llvm/utils/TableGen` and `tools/llvm-config` but can't seems to find the proper method to invoke that.

Is there an easy way to get the bare minimal native tools to be built?  help much appreciated.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsVEuP4jgQ_jXmUgIZBwIccuDZyy4DvQ1aaU_ISSqJZxwb2Q4o_35kA8NDfcmhbFe-VxW3VpQKMSHDGRkuOrxxlTaJq2jNR51U522yb-qam5ZEU6hQnkAh5piD02AwbzKEtBEyBydqBF2A4k6cEZzW0vYIXRA6vX4_jdDGP8uMtrab6fokpFAlrAkb1VAIY921ly_e2pCYZpKrsutSWaIiMSVs7qtSnutHEbjK_1QzrQpR-qqrUEGOhVC-JYnpZvPfj-Nht9vsj7P1dvr1_3Gx_no0Dcfz3Xa1_ngrHqazzfJ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