summaryrefslogtreecommitdiff
path: root/libcxx
diff options
context:
space:
mode:
authorMark de Wever <koraq@xs4all.nl>2023-04-28 17:34:59 +0200
committerMark de Wever <koraq@xs4all.nl>2023-05-03 18:35:41 +0200
commitd58ba7a4d145c60039d9a87f7265e56716e3bedd (patch)
tree0396771e96bfe4c59a8a8b4b91977b94cb3831b0 /libcxx
parentbd7da23c66947b601cef4f1a33d3bbc1a5365e36 (diff)
downloadllvm-d58ba7a4d145c60039d9a87f7265e56716e3bedd.tar.gz
[libc++][test] Makes pthread a flag.
Using pthread may affect the compilation too not only the linking. Therefore pthread is changed from a link flag to a generic flag used for both compilation and linking. This fixes an issue when using modules since the use of the pthread flag makes the BMI files not compatible. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D149453
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/test/configs/ibm-libc++-shared.cfg.in4
-rw-r--r--libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in4
-rw-r--r--libcxx/test/configs/llvm-libc++-shared.cfg.in4
-rw-r--r--libcxx/test/configs/llvm-libc++-static.cfg.in4
4 files changed, 8 insertions, 8 deletions
diff --git a/libcxx/test/configs/ibm-libc++-shared.cfg.in b/libcxx/test/configs/ibm-libc++-shared.cfg.in
index a93b3085c21c..7881556603cf 100644
--- a/libcxx/test/configs/ibm-libc++-shared.cfg.in
+++ b/libcxx/test/configs/ibm-libc++-shared.cfg.in
@@ -4,9 +4,9 @@
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
-config.substitutions.append(('%{flags}', ''))
+config.substitutions.append(('%{flags}', '-pthread'))
config.substitutions.append(('%{compile_flags}',
- '-nostdinc++ -D__LIBC_NO_CPP_MATH_OVERLOADS__ -I %{include} -I %{libcxx}/test/support -pthread'
+ '-nostdinc++ -D__LIBC_NO_CPP_MATH_OVERLOADS__ -I %{include} -I %{libcxx}/test/support'
))
config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{lib} -lc++ -lc++abi -latomic -Wl,-bbigtoc'
diff --git a/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in b/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in
index eeeafcf0c99b..df4aaa311dc4 100644
--- a/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in
+++ b/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in
@@ -4,12 +4,12 @@
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
-config.substitutions.append(('%{flags}', ''))
+config.substitutions.append(('%{flags}', '-pthread'))
config.substitutions.append(('%{compile_flags}',
'-nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support'
))
config.substitutions.append(('%{link_flags}',
- '-L %{lib} -Wl,-rpath,%{lib} -nodefaultlibs -lc++ -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc -latomic'
+ '-L %{lib} -Wl,-rpath,%{lib} -nodefaultlibs -lc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc -latomic'
))
config.substitutions.append(('%{exec}',
'%{executor} --execdir %T -- '
diff --git a/libcxx/test/configs/llvm-libc++-shared.cfg.in b/libcxx/test/configs/llvm-libc++-shared.cfg.in
index eb86b88f956a..143b3b3feae1 100644
--- a/libcxx/test/configs/llvm-libc++-shared.cfg.in
+++ b/libcxx/test/configs/llvm-libc++-shared.cfg.in
@@ -4,13 +4,13 @@
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
config.substitutions.append(('%{flags}',
- '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
+ '-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'
))
config.substitutions.append(('%{link_flags}',
- '-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++ -pthread'
+ '-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++'
))
config.substitutions.append(('%{exec}',
'%{executor} --execdir %T -- '
diff --git a/libcxx/test/configs/llvm-libc++-static.cfg.in b/libcxx/test/configs/llvm-libc++-static.cfg.in
index 8b66a129098b..e866d4f52a06 100644
--- a/libcxx/test/configs/llvm-libc++-static.cfg.in
+++ b/libcxx/test/configs/llvm-libc++-static.cfg.in
@@ -4,13 +4,13 @@
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
config.substitutions.append(('%{flags}',
- '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
+ '-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'
))
config.substitutions.append(('%{link_flags}',
- '-nostdlib++ -L %{lib} -lc++ -lc++abi -pthread'
+ '-nostdlib++ -L %{lib} -lc++ -lc++abi'
))
config.substitutions.append(('%{exec}',
'%{executor} --execdir %T -- '