| Issue |
97595
|
| Summary |
cross compile for aarch64 _config_site' file not found
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
xiedeacc
|
my host is linux x86_64. I want clang can build binary both for x86_64 and aarch64, x86_64 works well, but build for aarch64 use follow command meet error fatal error: '__config_site' file not found
```
clang --target=aarch64-linux-gnu \
--sysroot=/root/src/software/openwrt/openwrt-toolchain-23.05.3-rockchip-armv8_gcc-12.3.0_musl.Linux-x86_64/toolchain-aarch64_generic_gcc-12.3.0_musl \
main.cc
```
after google a lot, most doc ambiguous, but get clang it self need compile with some option to support for cross compile, my llvm/clang compiled by below command, it seems miss LLVM_RUNTIME_TARGETS option, but cannot find this option from https://llvm.org/docs/CMake.html , and what's difference between LLVM_RUNTIME_TARGETS and LLVM_TARGET_ARCH???
```
cmake -G "Unix Makefiles" ../llvm \
-DCMAKE_INSTALL_PREFIX=/usr/local/llvm/18 \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="bolt;clang;clang-tools-extra;libclc;lld;lldb;mlir;polly;openmp" \
-DLLVM_ENABLE_RUNTIMES="libc;libunwind;libcxxabi;pstl;libcxx;compiler-rt" \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_BUILD_TESTS=OFF \
-DLLDB_INCLUDE_TESTS=OFF \
-DCLANG_INCLUDE_TESTS=OFF \
-DCLANG_DEFAULT_CXX_STDLIB=libc++ \
-DCLANG_DEFAULT_RTLIB=compiler-rt \
-DCLANG_DEFAULT_LINKER=lld
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs