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

    <tr>
        <th>Summary</th>
        <td>
            llvm-config usage in cross compilation?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    When cross compiling items such as mesa with llvm support, the build process relies on output of llvm-config, and therefore on ability to run llvm-config. But if llvm as a whole has been cross-built, then it is not possible to run llvm-config because it needs a different computer.

How should this situation be handled? One option is to make llvm-config a arch-independent script (it is now a cpp program). Another is to also make it a script, but have it be only a thin wrapper over llvm's pkg-config file (which currently does not exist).

Suggestions?

Yocto project has until now dealt with this by 
- building llvm-config first for the build machine, then running that. This does not work so well due to mismatches between host and target configurations.
- providing own replacement for llvm-config as a shell script. This also isn't great as its output is not kept in sync with what actual llvm-config produces.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxlVE2PmzAQ_TVwGQURQjbkwGHbatVbD61U9TiYAbsxNvJHaP59x5Bss6oUEWC-3rz3TGf7W_tTkgHhrPcg7DQrrcwIKtDkwUchAT1M5BEWFSRofZ349TxbF7LqMwRJ0EWle5idFcQ9HGlFHqwBG8McA9hhrdoJawY1piI0fSp0NFhHKRM7nhpuECy4aJ7TC_jELdTWIkFhHNJqAsn3HT2Q7xKGByDD6EF5MDbAzEHVcf7_rblcYPSUsg1Rn3r3ahgYlwkrFTGQK7LyS1a-btevdgEvbdQJP0_wKkQMijfoEiLTa-qzwxt8M7zWvAY4i0dPeKEPsxHQCblTpqeZ-MITvXBqDpBVzQP-wmlinhO1o8Mpq84FvPJWTN29L2p_b841eG-RaOiYNYnX9X2XONY3jjNoA4vDeeYO9sqXhCmrTh7my_jANijmi2EsUrH8IrpECNf3ljZS6Y_yIaF55uZ7HEfyaWfPFDxHflnBUHmJ3yTCKlw0Qel1wZ5Qh81aK6PdDbai3War5MVn3gblfAD2zZPzJhS8F72rzzqbVBckhgJ-pLbv0BfrLsCcLaQ19HH1xaT8hEFISo4KSzKVtDxltSm6kZIb0vToVrF98YDIO13VitEuPJdmjYKmJGZC-EHv5C4v09RNpDuwVUDlDWsQYHSEIaWq4B-n5-7jC7E1WDx_M2Kja5EpV7AB9YdJjKmPfBLvIHNq9y8vTX04NnWV9-2hPx_OmAcVNLXPddHjSGnE86dg3ZflzKPTrQxhZm1fs-qNfyODiF3Befyw2Wj9292F5kflfSTPN8fm3NS5bMW-L_HQNOJUdcfTcKYT9UPF4Oh03u9rzDV2pH2bHT9lxy-5aquyqvYc2ddVXVYFvpTdvhbYDdynbKqsLmlCpYs0uLBuzN22UxdHz0HNPvX_gsjfgpGP-qM_xiCtay9o8KpMvsJtV6x_AViixZo">