[compiler-rt] CompilerRT: Normalize COMPILER_RT_DEFAULT_TARGET_TRIPLE (PR #88835)
David Spickett via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 05:20:23 PDT 2024
DavidSpickett wrote:
> in livcxx/utils/ci/run-buildbot, install/lib/armv7m-none-eabi is hardcoded.
You're right, this isn't part of the compiler-rt cmake at all, and it does this too:
```
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
```
Which explains the layout.
> should we use clang -print-target-triple for it?
I'd rather be explicit and specify the path. One less layer to unpick when it goes wrong.
The following fixes the libcxx build:
```
$ git diff
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index 6d413f6753bc..a6c6ef93500d 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -369,7 +369,7 @@ macro(construct_compiler_rt_default_triple)
endif()
if ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
- execute_process(COMMAND ${CMAKE_C_COMPILER} --target=${COMPILER_RT_DEFAULT_TARGET_TRIPLE} -print-effective-triple
+ execute_process(COMMAND ${CMAKE_C_COMPILER} --target=${COMPILER_RT_DEFAULT_TARGET_TRIPLE} -print-target-triple
OUTPUT_VARIABLE COMPILER_RT_DEFAULT_TARGET_TRIPLE
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 23a2a1bbbc63..60307a7d4f35 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -217,7 +217,7 @@ function test-armv7m-picolibc() {
"${@}"
${NINJA} -vC "${BUILD_DIR}/compiler-rt" install
- mv "${BUILD_DIR}/install/lib/armv7m-none-eabi"/* "${BUILD_DIR}/install/lib"
+ mv "${BUILD_DIR}/install/lib/armv7m-none-unknown-eabi"/* "${BUILD_DIR}/install/lib"
check-runtimes
}
```
So does -print-target-triple:
* Achieve the original goals of this PR?
* Work for the Windows builds?
https://github.com/llvm/llvm-project/pull/88835
More information about the llvm-commits
mailing list