[libcxx-commits] [libcxx] [libc++abi][test][VE] Add '-ldl' to support VE (PR #66605)
Kazushi Marukawa via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 21 15:27:20 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'
----------------
kaz7 wrote:
In general, yes. However, libcxx and libcxxabi want to link test programs under `-nostdlib++` option. This avoid automatic linking. Therefore we all need to specify all libraries like not only `-ldl` but also `-lc++`.
https://github.com/llvm/llvm-project/pull/66605
More information about the libcxx-commits
mailing list