[compiler-rt] [XRay] Run tests inside bootstrapping build (PR #168378)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 07:21:52 PST 2025


https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/168378

>From 01fe3b5c8038c8e5bcbd64814d95f6f488793fe0 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Mon, 17 Nov 2025 14:35:12 +0000
Subject: [PATCH 1/2] [XRay] Run tests inside bootstrapping build

COMPILER_RT_STANDALONE_BUILD is set when doing a bootstrapping build
through LLVM_ENABLE_RUNTIMES with the CMake source directory being in
llvm/. This patch changes the XRay tests to also detect that we have
LLVM sources and the llvm-xray tool if we are in a bootstrapping build
through the use of the LLVM_TREE_AVAILABLE variable which is set in
runtimes/CMakeLists.txt.
---
 compiler-rt/test/xray/lit.site.cfg.py.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/test/xray/lit.site.cfg.py.in b/compiler-rt/test/xray/lit.site.cfg.py.in
index 72a7be6a80e3a..4ed82beb6a2ab 100644
--- a/compiler-rt/test/xray/lit.site.cfg.py.in
+++ b/compiler-rt/test/xray/lit.site.cfg.py.in
@@ -5,7 +5,7 @@ config.name_suffix = "@XRAY_TEST_CONFIG_SUFFIX@"
 config.xray_lit_source_dir = "@XRAY_LIT_SOURCE_DIR@"
 config.target_cflags = "@XRAY_TEST_TARGET_CFLAGS@"
 config.target_arch = "@XRAY_TEST_TARGET_ARCH@"
-config.built_with_llvm = ("@COMPILER_RT_STANDALONE_BUILD@" != "TRUE")
+config.built_with_llvm = ("@COMPILER_RT_STANDALONE_BUILD AND NOT LLVM_TREE_AVAILABLE@" != "TRUE")
 
 # TODO: Look into whether we can run a capability test on the standalone build to
 # see whether it can run 'llvm-xray convert' instead of turning off tests for a

>From cf0909e95fcfa20f7d8aeb312c05b29aafb9b62f Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Mon, 17 Nov 2025 15:21:10 +0000
Subject: [PATCH 2/2] Revert "Reapply "[compiler-rt] Default to Lit's Internal
 Shell" (#168232)"

This reverts commit bde90624185ea2cead0a8d7231536e2625d78798.

This caused failures on Darwin that were not caught by upstream
buildbots. Reverting for now to give myself some time to fix.
---
 compiler-rt/test/lit.common.cfg.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index 0f0f87915bafe..3f7dd8e402b78 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -113,9 +113,6 @@ def push_dynamic_library_lookup_path(config, new_path):
         config.environment[dynamic_library_lookup_var] = new_ld_library_path_64
 
 
-# TODO: Consolidate the logic for turning on the internal shell by default for all LLVM test suites.
-# See https://github.com/llvm/llvm-project/issues/106636 for more details.
-#
 # Choose between lit's internal shell pipeline runner and a real shell.  If
 # LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
 use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
@@ -123,8 +120,9 @@ def push_dynamic_library_lookup_path(config, new_path):
     # 0 is external, "" is default, and everything else is internal.
     execute_external = use_lit_shell == "0"
 else:
-    # Otherwise we default to internal everywhere.
-    execute_external = False
+    # Otherwise we default to internal on Windows and external elsewhere, as
+    # bash on Windows is usually very slow.
+    execute_external = not sys.platform in ["win32"]
 
 # Allow expanding substitutions that are based on other substitutions
 config.recursiveExpansionLimit = 10



More information about the llvm-commits mailing list