[libcxx-commits] [libcxx] [libcxxabi] [libunwind] [libc++/libc++abi/libunwind] Add new test configs for Clang runtime library. NFC. (PR #82734)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 19 12:31:32 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'
----------------
ldionne wrote:
Why is it necessary to specify `-lclang_rt.builtins`? Shouldn't Clang use the compiler-rt library that was built into the toolchain by default, since we're not removing the default library (with e.g. `-nodefaultlibs`)?
https://github.com/llvm/llvm-project/pull/82734
More information about the libcxx-commits
mailing list