[libcxx-commits] [libcxx] 167b506 - [libcxx][ci] In picolib build, ask clang for the normalised triple (#90722)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 1 07:10:05 PDT 2024
Author: David Spickett
Date: 2024-05-01T15:10:01+01:00
New Revision: 167b50669c03ad888bf2f00c61424bedac43a050
URL: https://github.com/llvm/llvm-project/commit/167b50669c03ad888bf2f00c61424bedac43a050
DIFF: https://github.com/llvm/llvm-project/commit/167b50669c03ad888bf2f00c61424bedac43a050.diff
LOG: [libcxx][ci] In picolib build, ask clang for the normalised triple (#90722)
This is needed for a workaround to make sure the link later succeeds. I
don't know the reason for that but it is definitely needed.
https://github.com/llvm/llvm-project/pull/89234 will/wants to correct
the triple normalisation for -none- and this means that clang prior to
19, and clang 19 and above will have different answers and therefore
different library paths.
I don't want to bootstrap a clang just for libcxx CI, or require that
anyone building for Arm do the same, so ask the compiler what the triple
should be.
This will be compatible with 17 and 19 when we do update to that
version.
I'm assuming $CC is what anyone locally would set to override the
compiler, and `cc` is the binary name in our CI containers. It's not
perfect but it should cover most use cases.
Added:
Modified:
libcxx/utils/ci/run-buildbot
Removed:
################################################################################
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 60307a7d4f350a..e40c2b635ef908 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -217,7 +217,13 @@ function test-armv7m-picolibc() {
"${@}"
${NINJA} -vC "${BUILD_DIR}/compiler-rt" install
- mv "${BUILD_DIR}/install/lib/armv7m-none-unknown-eabi"/* "${BUILD_DIR}/install/lib"
+
+ # Prior to clang 19, armv7m-none-eabi normalised to armv7m-none-unknown-eabi.
+ # clang 19 changed this to armv7m-unknown-none-eabi. So for as long as 18.x
+ # is supported, we have to ask clang what the triple will be.
+ NORMALISED_TARGET_TRIPLE=$(${CC-cc} --target=armv7m-none-eabi -print-target-triple)
+ # Without this step linking fails later in the build.
+ mv "${BUILD_DIR}/install/lib/${NORMALISED_TARGET_TRIPLE}"/* "${BUILD_DIR}/install/lib"
check-runtimes
}
More information about the libcxx-commits
mailing list