Skip to content

Conversation

@ndrewh
Copy link
Contributor

@ndrewh ndrewh commented Dec 5, 2025

COMPILER_RT_STANDALONE_BUILD is set when doing a LLVM_ENABLE_RUNTIMES build. This prevents the sanitizer runtimes from being added as dependencies to check-sanitizer. Currently, if you make runtime changes and then run check-sanitizer you won't actually be testing a rebuilt runtime.

I don't follow why COMPILER_RT_STANDALONE_BUILD is even relevant here (was it ever?), so the right thing to do may be to remove the check entirely instead of adding OR LLVM_RUNTIMES_BUILD like I'm doing here..

rdar://165894534

@llvmbot
Copy link
Member

llvmbot commented Dec 5, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Andrew Haberlandt (ndrewh)

Changes

COMPILER_RT_STANDALONE_BUILD is set when doing a LLVM_ENABLE_RUNTIMES build. This prevents the sanitizer runtimes from being added as dependencies to check-sanitizer. Currently, if you make runtime changes and then run check-sanitizer you won't actually be testing a rebuilt runtime.

I don't follow why COMPILER_RT_STANDALONE_BUILD is even relevant here (was it ever?), so the right thing to do may be to remove the check entirely instead of adding OR LLVM_RUNTIMES_BUILD like I'm doing here..


Full diff: https://github.com/llvm/llvm-project/pull/170817.diff

1 Files Affected:

  • (modified) compiler-rt/test/sanitizer_common/CMakeLists.txt (+1-1)
diff --git a/compiler-rt/test/sanitizer_common/CMakeLists.txt b/compiler-rt/test/sanitizer_common/CMakeLists.txt
index 7596e2005a3b5..88bf29f98642b 100644
--- a/compiler-rt/test/sanitizer_common/CMakeLists.txt
+++ b/compiler-rt/test/sanitizer_common/CMakeLists.txt
@@ -51,7 +51,7 @@ message(
 # Create a separate config for each tool we support.
 foreach(tool ${SUPPORTED_TOOLS})
   string(TOUPPER ${tool} tool_toupper)
-  if(${tool_toupper}_SUPPORTED_ARCH AND NOT COMPILER_RT_STANDALONE_BUILD)
+  if(${tool_toupper}_SUPPORTED_ARCH AND (NOT COMPILER_RT_STANDALONE_BUILD OR LLVM_RUNTIMES_BUILD))
     list(APPEND SANITIZER_COMMON_TEST_DEPS ${tool})
   endif()
   set(TEST_ARCH ${${tool_toupper}_SUPPORTED_ARCH})

@ndrewh ndrewh requested a review from wrotki December 8, 2025 18:06
Copy link
Contributor

@wrotki wrotki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable

@ndrewh ndrewh merged commit b4144c1 into llvm:main Dec 16, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants