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

    <tr>
        <th>Summary</th>
        <td>
            [OpenMP] support disable CMake thread search for cross compilation
        </td>
    </tr>

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

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

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

<pre>
    OpenMP has a check for Wasm to disable searching for threading library: 

https://github.com/llvm/llvm-project/blob/48aebd4cf88b3632e8c3ed6b976287c973628e14/openmp/runtime/cmake/config-ix.cmake#L157-L158

This would be true for other cross-builds as well, where sysroot doesn't contain a threading library. I've ran into it while investigating RISC-V cross-compilation for #87026. I think the check can be expanded into a CMake cache variable. 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkk9v2zgQxT8NdRlYkIb6e9Ahm0BAgAS72BbteUSNTdY0KZCUnfTTF5bdNkBPvWggDsGZ996PYjQHxzyI-h9RP2W0Ju3DsCzsvhuXTX5-H_5d2L3-B5oiECjN6gh7H-ArxRMkD7OJNFmGyBSUNu6wdZMOTPP1z5opUHgX8gFE8SSKh9tXp7REIR8EjgLHg0l6nXLlTwJHa88_y24J_hurJHCcrJ8EjlVHPM2V2nfdJBuJ3CnJczP1bYNdq_pWNthxWQkc_cLutAgcw-qSObHAUZ3ouFXv9uawM2_5_US-lHW7eynr7uOSn7WJcPGrnWFiSGHlTZxPmgOo4GPcTauxcwSKcGFrBT7CRXNgiO8xeJ9g9hydwDaB8i6RcUB_mpPDs8D2zBDIgXHJg0lw0cYyGHfmmMyB0vX-_8-fHndf7qOVPy3GUjLebWsJlF1bYJPDMyRt3BGS5ntiitxVAr8t5Gaeb0MIHl_pyKBIaYYzBXNNModsHuTcy54yHsq27IpGdlWf6aEtqZd911VEauIGq4abppTYy6bqWykzM2CBVdGUBcq6xT5X1LV12TS9avfVvpOiKvhExubXdHMfDpmJceWhr4sGM0sT27jBiOj4AltTIF7ZDMNGxLQeoqgKa2KKv19JJtmN4huton6CuC6LD-kXoDetN-_vtG62bWbCBzOzNdjhr_ncVo0Cx5uU84A_AgAA___C3xmo">