lancethepants added a comment. > @lancethepants @smeenai thanks for the pointers! Unfortunately, it still > doesn't work for me after passing -DCMAKE_SYSTEM_NAME="Linux". Passing that > option did change the CMake output, so it's definitely recognized at least > (the messages about which sanitizer tests will run now call the platform > "Linux" as opposed to referring to the platform as default). I am also > compiling on Linux for Linux, I'm just trying to build an AArch64 toolchain > which I can copy to an SD card for testing on an AArch64 board. > @lancethepants could you check your CMake version where you got this to work? > I'm using CMake 3.22.1 and trying to build llvmorg-13.0.0 > > The full invocation I'm using is the following: > > cmake -G Ninja \ > -DLLVM_TABLEGEN=${TOP}/${CLANG_TBLGEN_DIR}/bin/llvm-tblgen \ > -DCLANG_TABLEGEN=${TOP}/${CLANG_TBLGEN_DIR}/bin/clang-tblgen \ > -DCMAKE_SYSTEM_NAME="Linux" \ > -DCMAKE_CROSSCOMPILING=ON \ > -DCLANG_TOOLING_BUILD_AST_INTROSPECTION=OFF \ > -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \ > -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \ > -DCMAKE_BUILD_TYPE=MinSizeRel \ > -DCMAKE_INSTALL_PREFIX=${TOP}/${ROOT_DIR} \ > -DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-linux-gnu \ > -DLLVM_NATIVE_ARCH="X86" \ > -DLLVM_TARGET_ARCH="AArch64" \ > -DLLVM_TARGETS_TO_BUILD="AArch64" \ > -DLLVM_ENABLE_PROJECTS="clang;compiler-rt;lld;" \ > -DLLVM_ENABLE_TERMINFO=OFF \ > -DLLVM_ENABLE_BINDINGS=OFF \ > -DLLVM_BUILD_EXAMPLES=OFF \ > -DLLVM_BUILD_TESTS=OFF \ > -DLLVM_BUILD_BENCHMARKS=OFF \ > ${TOP}/${SRC_DIR}/llvm/
Are you stil encountering the same issue? This is my cmake invocation. https://github.com/lancethepants/tomatoware/blob/master/scripts/buildroot.sh#L808-L843 I typically update cmake to the most recent whenver I get around to updating my project. The latest I've used is 3.21.4. Looks like you're using the very newest, so I doubt it's the difference between my version and your version. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits