[clang] [clang][python] Don't add check-clang-python to check-all if cross-compiling (PR #111657)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 9 04:20:34 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)
----------------
Endilll wrote:

Do I understand correctly that you don't have this kind of problem with "regular" tests in `clang/test`? If so, I think it'd be novel to say that tests for entire components are second-class citizens simply because said components are written in Python. As far as commitments go, I think our default here is to support all kinds of tests.

That said, I understand that complexity is there (it appears that nothing is easy in cross-compiling), and what you described doesn't seem to be too convoluted, given the inherent complexity of the problem. We can leave this out of scope of this PR, but I'd expect that claiming official support for cross-compiling environments is going to be blocked on this.

https://github.com/llvm/llvm-project/pull/111657


More information about the cfe-commits mailing list