[clang] b45ad73 - [clang] Use usual lit pattern for CLANG_DEFAULT_PIE_ON_LINUX and LLVM_WITH_Z3
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 14 18:45:45 PST 2021
Author: Nico Weber
Date: 2021-12-14T21:44:56-05:00
New Revision: b45ad7363c306e17422401f318cc243cb9fd99d4
URL: https://github.com/llvm/llvm-project/commit/b45ad7363c306e17422401f318cc243cb9fd99d4
DIFF: https://github.com/llvm/llvm-project/commit/b45ad7363c306e17422401f318cc243cb9fd99d4.diff
LOG: [clang] Use usual lit pattern for CLANG_DEFAULT_PIE_ON_LINUX and LLVM_WITH_Z3
See D28294 for context.
Differential Revision: https://reviews.llvm.org/D115751
Added:
Modified:
clang/test/CMakeLists.txt
clang/test/lit.cfg.py
clang/test/lit.site.cfg.py.in
Removed:
################################################################################
diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt
index 517fd64791247..32405fad820a9 100644
--- a/clang/test/CMakeLists.txt
+++ b/clang/test/CMakeLists.txt
@@ -11,6 +11,7 @@ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUN
llvm_canonicalize_cmake_booleans(
CLANG_BUILD_EXAMPLES
+ CLANG_DEFAULT_PIE_ON_LINUX
CLANG_ENABLE_ARCMT
CLANG_ENABLE_STATIC_ANALYZER
CLANG_SPAWN_CC1
@@ -19,7 +20,9 @@ llvm_canonicalize_cmake_booleans(
LLVM_ENABLE_ZLIB
LLVM_ENABLE_PER_TARGET_RUNTIME_DIR
LLVM_ENABLE_PLUGINS
- LLVM_ENABLE_THREADS)
+ LLVM_ENABLE_THREADS
+ LLVM_WITH_Z3
+ )
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
diff --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py
index 514ddf997c7ce..a1a3bf6ee626d 100644
--- a/clang/test/lit.cfg.py
+++ b/clang/test/lit.cfg.py
@@ -98,7 +98,7 @@ def have_host_jit_support():
config.available_features.add('staticanalyzer')
tools.append('clang-check')
- if config.clang_staticanalyzer_z3 == '1':
+ if config.clang_staticanalyzer_z3:
config.available_features.add('z3')
check_analyzer_fixit_path = os.path.join(
@@ -121,7 +121,7 @@ def have_host_jit_support():
if config.has_plugins and config.llvm_plugin_ext:
config.available_features.add('plugins')
-if config.clang_default_pie_on_linux == '1':
+if config.clang_default_pie_on_linux:
config.available_features.add('default-pie-on-linux')
# Set available features we allow tests to conditionalize on.
diff --git a/clang/test/lit.site.cfg.py.in b/clang/test/lit.site.cfg.py.in
index 807c1d3472173..bc3022d2bee9a 100644
--- a/clang/test/lit.site.cfg.py.in
+++ b/clang/test/lit.site.cfg.py.in
@@ -22,10 +22,10 @@ config.host_cxx = "@CMAKE_CXX_COMPILER@"
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
config.have_zlib = @LLVM_ENABLE_ZLIB@
config.clang_arcmt = @CLANG_ENABLE_ARCMT@
-config.clang_default_pie_on_linux = "@CLANG_DEFAULT_PIE_ON_LINUX@"
+config.clang_default_pie_on_linux = @CLANG_DEFAULT_PIE_ON_LINUX@
config.clang_default_cxx_stdlib = "@CLANG_DEFAULT_CXX_STDLIB@"
config.clang_staticanalyzer = @CLANG_ENABLE_STATIC_ANALYZER@
-config.clang_staticanalyzer_z3 = "@LLVM_WITH_Z3@"
+config.clang_staticanalyzer_z3 = @LLVM_WITH_Z3@
config.clang_examples = @CLANG_BUILD_EXAMPLES@
config.enable_shared = @ENABLE_SHARED@
config.enable_backtrace = @ENABLE_BACKTRACES@
More information about the cfe-commits
mailing list