summaryrefslogtreecommitdiff
path: root/compiler-rt
diff options
context:
space:
mode:
authorMichael Kruse <llvm-project@meinersbur.de>2025-11-19 13:51:14 +0100
committerGitHub <noreply@github.com>2025-11-19 13:51:14 +0100
commitc32c1d0d21cedb8017914eb6951bea4cf1fb10f9 (patch)
treea42400e4d43c428fddd71ef45a41f1fb03207956 /compiler-rt
parent7b94dd336e25b18e05b3b1f20360df81e4900ffb (diff)
[Runtimes] Default build must use its own output dirs (#168266)
Post-commit fix of #164794 reported at https://github.com/llvm/llvm-project/pull/164794#issuecomment-3536253493 `LLVM_LIBRARY_OUTPUT_INTDIR` and `LLVM_RUNTIME_OUTPUT_INTDIR` is used by `AddLLVM.cmake` as output directories. Unless we are in a bootstrapping-build, It must not point to directories found by `find_package(LLVM)` which may be read-only directories. MLIR for instance sets thesese variables to its own build output directory, so should the runtimes.
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/cmake/base-config-ix.cmake4
-rw-r--r--compiler-rt/lib/sanitizer_common/symbolizer/CMakeLists.txt2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake
index d92bc0e71fa1..37dfa5534dfe 100644
--- a/compiler-rt/cmake/base-config-ix.cmake
+++ b/compiler-rt/cmake/base-config-ix.cmake
@@ -59,9 +59,9 @@ if (LLVM_TREE_AVAILABLE)
set(_host_executable_suffix ${CMAKE_EXECUTABLE_SUFFIX})
endif()
set(COMPILER_RT_TEST_COMPILER
- ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang${_host_executable_suffix})
+ ${LLVM_TOOLS_BINARY_DIR}/clang${_host_executable_suffix})
set(COMPILER_RT_TEST_CXX_COMPILER
- ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++${_host_executable_suffix})
+ ${LLVM_TOOLS_BINARY_DIR}/clang++${_host_executable_suffix})
else()
# Take output dir and install path from the user.
set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/symbolizer/CMakeLists.txt
index ab37454acbe1..bb8298931c39 100644
--- a/compiler-rt/lib/sanitizer_common/symbolizer/CMakeLists.txt
+++ b/compiler-rt/lib/sanitizer_common/symbolizer/CMakeLists.txt
@@ -13,7 +13,7 @@ foreach(arch ${SANITIZER_COMMON_SUPPORTED_ARCH})
scripts/build_symbolizer.sh
WORKING_DIRECTORY ${RTSanitizerCommonSymbolizerInternalDir}
COMMAND FLAGS=${TARGET_CFLAGS}
- CLANG=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang
+ CLANG=${LLVM_TOOLS_BINARY_DIR}/clang
${CMAKE_CURRENT_SOURCE_DIR}/scripts/build_symbolizer.sh
${CMAKE_CURRENT_BINARY_DIR}/RTSanitizerCommonSymbolizerInternal.${arch}.o
USES_TERMINAL)