[llvm] ec15b24 - [llvm][Support] Only enable backtrace test when it's enabled (#123852)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 10:38:00 PST 2025


Author: Jon Roelofs
Date: 2025-01-22T10:37:56-08:00
New Revision: ec15b242505a46ea7d195a6520fb869a80a2cd10

URL: https://github.com/llvm/llvm-project/commit/ec15b242505a46ea7d195a6520fb869a80a2cd10
DIFF: https://github.com/llvm/llvm-project/commit/ec15b242505a46ea7d195a6520fb869a80a2cd10.diff

LOG: [llvm][Support] Only enable backtrace test when it's enabled (#123852)

rdar://138554797

Added: 
    

Modified: 
    llvm/test/CMakeLists.txt
    llvm/test/Other/crash-stack-trace.ll
    llvm/test/lit.cfg.py
    llvm/test/lit.site.cfg.py.in

Removed: 
    


################################################################################
diff  --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt
index c66075434f1583..231dcfa35a34c3 100644
--- a/llvm/test/CMakeLists.txt
+++ b/llvm/test/CMakeLists.txt
@@ -1,6 +1,7 @@
 llvm_canonicalize_cmake_booleans(
   BUILD_SHARED_LIBS
   HAVE_OCAMLOPT
+  ENABLE_BACKTRACES
   LLVM_ENABLE_DIA_SDK
   LLVM_ENABLE_FFI
   LLVM_ENABLE_THREADS

diff  --git a/llvm/test/Other/crash-stack-trace.ll b/llvm/test/Other/crash-stack-trace.ll
index 29e43fe8197c28..104933dffa0a94 100644
--- a/llvm/test/Other/crash-stack-trace.ll
+++ b/llvm/test/Other/crash-stack-trace.ll
@@ -1,4 +1,4 @@
-; REQUIRES: asserts
+; REQUIRES: asserts, backtrace
 
 ; RUN: not --crash opt -passes=trigger-crash-module %s -disable-output 2>&1 | \
 ; RUN: FileCheck %s --check-prefix=CHECK-MODULE

diff  --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index 5a03a85386e0aa..b17d41fa11af7c 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -597,6 +597,9 @@ def have_ld64_plugin_support():
 ) and not re.match(r"^arm64(e)?-apple-(macos|darwin)", config.target_triple):
     config.available_features.add("debug_frame")
 
+if config.enable_backtrace:
+    config.available_features.add("backtrace")
+
 if config.enable_threads:
     config.available_features.add("thread_support")
 

diff  --git a/llvm/test/lit.site.cfg.py.in b/llvm/test/lit.site.cfg.py.in
index 0968f6214772d0..0d02920323d2dd 100644
--- a/llvm/test/lit.site.cfg.py.in
+++ b/llvm/test/lit.site.cfg.py.in
@@ -41,6 +41,7 @@ config.have_httplib = @LLVM_ENABLE_HTTPLIB@
 config.have_dia_sdk = @LLVM_ENABLE_DIA_SDK@
 config.enable_ffi = @LLVM_ENABLE_FFI@
 config.build_examples = @LLVM_BUILD_EXAMPLES@
+config.enable_backtrace = @ENABLE_BACKTRACES@
 config.enable_threads = @LLVM_ENABLE_THREADS@
 config.build_shared_libs = @BUILD_SHARED_LIBS@
 config.link_llvm_dylib = @LLVM_LINK_LLVM_DYLIB@


        


More information about the llvm-commits mailing list