[clang] [clang][python] Don't add check-clang-python to check-all if cross-compiling (PR #111657)
Alex Bradbury via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 9 04:30:35 PDT 2024
================
@@ -47,6 +47,14 @@ if(${LLVM_NATIVE_ARCH} MATCHES "^(AArch64|Hexagon|Sparc|SystemZ)$")
set(RUN_PYTHON_TESTS FALSE)
endif()
+# Tests will fail if cross-compiling for a different target, as tests will try
+# to use the host Python3_EXECUTABLE and make FFI calls to functions in target
+# libraries.
+if(CMAKE_CROSS_COMPILING)
----------------
asb wrote:
Yes, I'm trying for now to just make changes that remove the small bits of friction for cross-compiling and then testing using qemu-user as a litmus test rather than (for now) make it "officially supported".
It is indeed correct that there's no problem with the regular tests in clang/test (other than clang/test/Driver/env.c if you need QEMU_LD_PREFIX passed through, as the test strips envvars - but of course for the lit-orchestrated tests we already have a mechanism to skip tests downstream by configuring the LIT_ARGS).
https://github.com/llvm/llvm-project/pull/111657
More information about the cfe-commits
mailing list