[libcxx-commits] [libcxx] [libc++][test][VE] Add '-ldl' to support VE (PR #66609)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Sep 17 21:36:44 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
<details>
<summary>Changes</summary>
Tests are linked under -nostdlib++ option, so it is required to add system's libraries correctly. So, I add libdl.so which is required for VE.
---
Full diff: https://github.com/llvm/llvm-project/pull/66609.diff
1 Files Affected:
- (modified) libcxx/test/configs/llvm-libc++-shared.cfg.in (+10-3)
``````````diff
diff --git a/libcxx/test/configs/llvm-libc++-shared.cfg.in b/libcxx/test/configs/llvm-libc++-shared.cfg.in
index 143b3b3feae1109..bcf395cad1a1fe2 100644
--- a/libcxx/test/configs/llvm-libc++-shared.cfg.in
+++ b/libcxx/test/configs/llvm-libc++-shared.cfg.in
@@ -9,13 +9,20 @@ config.substitutions.append(('%{flags}',
config.substitutions.append(('%{compile_flags}',
'-nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support'
))
-config.substitutions.append(('%{link_flags}',
- '-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++'
-))
config.substitutions.append(('%{exec}',
'%{executor} --execdir %T -- '
))
+if config.root.target_triple.startswith('ve-'):
+ # VE requires libdl library.
+ config.substitutions.append(('%{link_flags}',
+ '-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++ -ldl'
+ ))
+else:
+ config.substitutions.append(('%{link_flags}',
+ '-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++'
+ ))
+
import os, site
site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
import libcxx.test.params, libcxx.test.config
``````````
</details>
https://github.com/llvm/llvm-project/pull/66609
More information about the libcxx-commits
mailing list