summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2019-01-16 08:05:13 +0000
committerMichal Gorny <mgorny@gentoo.org>2019-01-16 08:05:13 +0000
commit11002c21170e18ef7a81009b4e50ed2f4cf21ccb (patch)
tree39aa709f58871cb5ebce8470b9ac696cec2640e7
parent9259c236ce36ac76b8dcc8209f6490c748ec60a5 (diff)
[test] Disable Python binding tests w/ LLVM_ENABLE_PIC=OFF
Disable Python binding tests when LLVM_ENABLE_PIC is disabled, as libclang.so is not being built in that case. Reported by Nico Weber. Differential Revision: https://reviews.llvm.org/D56732
-rw-r--r--clang/bindings/python/tests/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/bindings/python/tests/CMakeLists.txt b/clang/bindings/python/tests/CMakeLists.txt
index 3386e6428c2..7af6503f158 100644
--- a/clang/bindings/python/tests/CMakeLists.txt
+++ b/clang/bindings/python/tests/CMakeLists.txt
@@ -10,6 +10,11 @@ add_custom_target(check-clang-python
set(RUN_PYTHON_TESTS TRUE)
set_target_properties(check-clang-python PROPERTIES FOLDER "Clang tests")
+# Tests require libclang.so which is only built with LLVM_ENABLE_PIC=ON
+if(NOT LLVM_ENABLE_PIC)
+ set(RUN_PYTHON_TESTS FALSE)
+endif()
+
# Do not try to run if libclang was built with ASan because
# the sanitizer library will likely be loaded too late to perform
# interception and will then fail.