[libcxx-commits] [libcxx] [libc++abi][test][VE] Add '-ldl' to support VE (PR #66605)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 19 08:44:22 PDT 2023


================
@@ -0,0 +1,28 @@
+# This testing configuration handles running the test suite against LLVM's
+# libc++ for VE using a shared library.
+
+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} -I %{target-include} -I %{libcxx}/test/support'
+))
+# VE requires libdl library.
+config.substitutions.append(('%{link_flags}',
+    '-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++ -ldl'
----------------
ldionne wrote:

If a hello world program requires `-ldl` on VE in order to work properly, shouldn't Clang automatically add that library when the triple is specified to `<arch>-ve-whatever`?

https://github.com/llvm/llvm-project/pull/66605


More information about the libcxx-commits mailing list