From: Michal Gorny Date: Wed, 16 Jan 2019 08:05:13 +0000 (+0000) Subject: [test] Disable Python binding tests w/ LLVM_ENABLE_PIC=OFF X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7bf1d4162a88006dd5d46aac18b5f8689bae4ffe;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351304 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/bindings/python/tests/CMakeLists.txt b/bindings/python/tests/CMakeLists.txt index 3386e6428c..7af6503f15 100644 --- a/bindings/python/tests/CMakeLists.txt +++ b/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.