This is a backport request for 73d862e478738675f5d919c6a196429acd7b5f50 which is a revert for f6f88f4b99638821af803d1911ab6a7dac04880b. The latter unfortunately breaks cross compiled ENABLE_RUNTIMES=compiler-rt. It has been fixed on main in the commit requested for backport. If I diff the CMakeCache within the runtimes-bins dir of the bad commit, then I see that with LLVM_CMAKE_DIR passed, it results in various details of the runtimes build not being correct - we see LLVM_DIR=/usr/lib/llvm-14 in the CMakeCache for example, rather than path/to/build/lib/cmake/llvm for the working version.
The below cmake line on a x86 ubuntu 2204 or 2404 machine targetting aarch64-none-linux-gnu reproduces the issue.
This is a backport request for 73d862e478738675f5d919c6a196429acd7b5f50 which is a revert for f6f88f4b99638821af803d1911ab6a7dac04880b. The latter unfortunately breaks cross compiled ENABLE_RUNTIMES=compiler-rt. It has been fixed on main in the commit requested for backport. If I diff the CMakeCache within the runtimes-bins dir of the bad commit, then I see that with LLVM_CMAKE_DIR passed, it results in various details of the runtimes build not being correct - we see
LLVM_DIR=/usr/lib/llvm-14
in the CMakeCache for example, rather thanpath/to/build/lib/cmake/llvm
for the working version.The below cmake line on a x86 ubuntu 2204 or 2404 machine targetting aarch64-none-linux-gnu reproduces the issue.
In the bad case this fails with something like this, because the broken compiler-rt build does not produce a builtins build:
cc @tru for release manager cc @omjavaid @jhuber6 for involvement in patches.