[libcxx-commits] [libcxx] [libcxxabi] [libunwind] [libc++/libc++abi/libunwind] Add new test configs for Clang runtime library. NFC. (PR #82734)
Vladimir Vereschaka via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 19 21:58:48 PDT 2024
================
@@ -0,0 +1,32 @@
+# This testing configuration handles running the test suite against LLVM's libc++
+# using a static library.
+#
+# This configuration uses a 'just-built' Clang runtime builtins library to link with
+# the tests instead of the target system library.
+#
+# Provided for testing of the LLVM/Clang toolchain builds.
+
+lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
+
+config.substitutions.append(('%{flags}',
+ '-pthread' + (' -isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '')
+))
+config.substitutions.append(('%{compile_flags}',
+ '-nostdinc++ -I %{include-dir} -I %{target-include-dir} -I %{libcxx-dir}/test/support'
+))
+config.substitutions.append(('%{link_flags}',
+ '-nostdlib++ -L %{lib-dir} -lclang_rt.builtins -lc++ -lc++abi'
----------------
vvereschaka wrote:
Previously, Clang didn't pass `clang_rt.builtins` to the linker when cross compiling.
I just checked the latest ToT Clang 20 and I found that the latest Clang already passes this library to the linker by default. Looks like the problem was solved and I don't need the extra test configurations anymore.
Thank you @ldionne . I'll close this PR.
```
"C:\\buildbot\\temp\\build\\bin\\ld.lld" --sysroot=C:/buildbot/fs/jetson-agx-ubuntu -EL --hash-style=gnu --eh-frame-hdr -m aarch64linux -pie -dynamic-linker /lib/ld-linux-aarch64.so.1 -o "C:\\buildbot\\temp\\build\\runtimes\\runtimes-aarch64-unknown-linux-gnu-bins\\test\\Output\\catch_multi_level_pointer.pass.cpp.dir\\t.tmp.exe" "C:/buildbot/fs/jetson-agx-ubuntu/lib/aarch64-linux-gnu\\Scrt1.o" "C:/buildbot/fs/jetson-agx-ubuntu/lib/aarch64-linux-gnu\\crti.o" "C:\\buildbot\\temp\\build\\lib\\clang\\20\\lib\\aarch64-unknown-linux-gnu\\clang_rt.crtbegin.o" -LC:/buildbot/temp/build/./lib/aarch64-unknown-linux-gnu "-LC:\\buildbot\\temp\\build\\bin\\..\\lib\\aarch64-unknown-linux-gnu" "-LC:\\buildbot\\temp\\build\\lib\\clang\\20\\lib\\aarch64-unknown-linux-gnu" -LC:/buildbot/fs/jetson-agx-ubuntu/lib/gcc/aarch64-linux-gnu/11 -LC:/buildbot/fs/jetson-agx-ubuntu/lib/aarch64-linux-gnu -LC:/buildbot/fs/jetson-agx-ubuntu/usr/lib/aarch64-linux-gnu -LC:/buildbot/fs/jetson-agx-ubuntu/lib -LC:/buildbot/fs/jetson-agx-ubuntu/usr/lib "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2\\catch_multi_level_pointer-9453c2.o" -lc++ -lc++abi -latomic --verbose -lm "C:\\buildbot\\temp\\build\\lib\\clang\\20\\lib\\aarch64-unknown-linux-gnu\\libclang_rt.builtins.a" --as-needed -lunwind --no-as-needed -lpthread -lc "C:\\buildbot\\temp\\build\\lib\\clang\\20\\lib\\aarch64-unknown-linux-gnu\\libclang_rt.builtins.a" --as-needed -lunwind --no-as-needed "C:\\buildbot\\temp\\build\\lib\\clang\\20\\lib\\aarch64-unknown-linux-gnu\\clang_rt.crtend.o" "C:/buildbot/fs/jetson-agx-ubuntu/lib/aarch64-linux-gnu\\crtn.o"
```
https://github.com/llvm/llvm-project/pull/82734
More information about the libcxx-commits
mailing list