You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When performing cross builds, we need native versions of various tools,
we cannot assume the cross builds that are part of the current build are
executable. LLVM provides the setup_host_tool function to handle this,
either picking up versions of tools from LLVM_NATIVE_TOOL_DIR, or
implicitly building native versions as needed. Use this in more places.
This applies the changes from LLVM #97392 and #97811 and adapts them to
DPC++, and makes the same changes in other places that are only needed
for DPC++.
Tested with a suitable cross compilation toolchain file:
```console
$ mkdir build
$ cat >build/aarch64-linux.cmake <<EOF
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_C_COMPILER "aarch64-linux-gnu-gcc" CACHE STRING "")
set(CMAKE_CXX_COMPILER "aarch64-linux-gnu-g++" CACHE STRING "")
set(PKG_CONFIG_EXECUTABLE "aarch64-linux-gnu-pkg-config" CACHE STRING "")
set(CMAKE_FIND_ROOT_PATH /usr/aarch64-linux-gnu)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
EOF
$ python3 buildbot/configure.py -o build/aarch64-linux \
--cmake-opt=--toolchain=$PWD/build/aarch64-linux.cmake \
--cmake-opt=-DLLVM_HOST_TRIPLE=aarch64-unknown-linux-gnu
```
0 commit comments