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

    <tr>
        <th>Summary</th>
        <td>
            [OpenMP] Pass the -DPython3_EXECUTABLE flag to the runtimes build 
        </td>
    </tr>

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

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

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

<pre>
    In the build environment, `python` is in a nondefault location. The `-DPython3_EXECUTABLE` flag is specified in the cmake command. Somehow the `find_package(Python3 ...)` function call in `runtimes/CMakeLists.txt` returns the `python` in the default location instead of the desired one. The build fails at building the LIT tests.

https://github.com/llvm/llvm-project/blob/66470112d6e00832cae2970fb56f491cd5f7b14a/runtimes/CMakeLists.txt#L170-L171

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUUsFupTgQ_BpzsYJMg-Fx4JDkBSnSizbSZqW9RY3dgPcZG2GTbP5-BCSj0WjmMBeQ5XJ1VXVhCGZwRA2Td0yeE1zj6Jfmen23Jum8_mgeHY8j8W41VnNyb2bxbiIXGdxzVor5I47esVJwE7hxHLnzTlOPq43ceoXReJfyl5E29M35ecfnrw__Ptz_83J7d3nY3vYWh40gzKRMb0hvVNtYNeGVuPLThE6n_G8_0ejf9ytWit44_TqjuuJADE6f3DxNUwb1zrs6tQngCq3dOFkpltVFM1Fg0N4_4ZUuJsSQxv_j9mChuC4ufA34wd2h52dn3LgQCTX3_ed9MAtp7h0dpo_cejQ2cIzH0bhhB18eX3ikbToTZyZuj-8Y4xxYfsugZdAOJo5rlyo_MWitffv63cyL_49UZNB21ncM2rIsKpFloEsS4pSDQoK6En0ny76oM6VlX3VZgQza30cA-SWrxM0lq7JDTaKbXNd5jQk1WQVCVnVWQzI2Sla9kqci7yqV5b2QVOoKa0LKcwSlE9OAgEJUmRCQ1xJSSZ2UkkCAOJ2gQlYImtDYdPOT-mVITAgrNfUJSplY7MiGvZcAfiY3zQxg6-jS7AF06xBYIeyu_TtFNNHubf5rJvf0zOSZP2M4Fvqr9h3Vi34HfOXyubVkXWzzx-vYTWzRHj7eGvgWAAD__8E9GFk">