[PATCH] D115751: [clang] Use usual lit pattern for CLANG_DEFAULT_PIE_ON_LINUX and LLVM_WITH_Z3

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 14 12:13:26 PST 2021


thakis created this revision.
thakis added a reviewer: MaskRay.
Herald added subscribers: mikhail.ramalho, mgorny.
thakis requested review of this revision.

See D28294 <https://reviews.llvm.org/D28294> for context.


https://reviews.llvm.org/D115751

Files:
  clang/test/CMakeLists.txt
  clang/test/lit.cfg.py
  clang/test/lit.site.cfg.py.in


Index: clang/test/lit.site.cfg.py.in
===================================================================
--- clang/test/lit.site.cfg.py.in
+++ clang/test/lit.site.cfg.py.in
@@ -22,10 +22,10 @@
 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@
Index: clang/test/lit.cfg.py
===================================================================
--- clang/test/lit.cfg.py
+++ clang/test/lit.cfg.py
@@ -98,7 +98,7 @@
     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 @@
 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.
Index: clang/test/CMakeLists.txt
===================================================================
--- clang/test/CMakeLists.txt
+++ clang/test/CMakeLists.txt
@@ -11,6 +11,7 @@
 
 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_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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115751.394342.patch
Type: text/x-patch
Size: 2173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211214/5971a439/attachment.bin>


More information about the cfe-commits mailing list