[libcxx-commits] [libcxx] [libc++][test][VE] Add '-ldl' to support VE (PR #66609)
Kazushi Marukawa via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Sep 17 21:36:08 PDT 2023
https://github.com/kaz7 created https://github.com/llvm/llvm-project/pull/66609
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.
>From b57423884ba67d4374fd6bd644c67c05fb2f6c1c Mon Sep 17 00:00:00 2001
From: "Kazushi (Jam) Marukawa" <marukawa at nec.com>
Date: Mon, 18 Sep 2023 06:30:58 +0200
Subject: [PATCH] [libc++][test][VE] Add '-ldl' to support VE
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.
---
libcxx/test/configs/llvm-libc++-shared.cfg.in | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
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
More information about the libcxx-commits
mailing list