[compiler-rt] 4df44a0 - [asan] Don't use libstdc++ in test
Alex Brachet via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 08:18:40 PDT 2023
Author: Alex Brachet
Date: 2023-05-19T15:17:59Z
New Revision: 4df44a008472ea1e5d7f581a1067d9f1b6d9dbf5
URL: https://github.com/llvm/llvm-project/commit/4df44a008472ea1e5d7f581a1067d9f1b6d9dbf5
DIFF: https://github.com/llvm/llvm-project/commit/4df44a008472ea1e5d7f581a1067d9f1b6d9dbf5.diff
LOG: [asan] Don't use libstdc++ in test
It shouldn't be assumed that libstdc++ is always available even on Linux.
Just let the compiler pick the default
Differential Revision: https://reviews.llvm.org/D150809
Added:
Modified:
compiler-rt/test/asan/TestCases/throw_invoke_test.cpp
compiler-rt/test/lit.common.cfg.py
Removed:
################################################################################
diff --git a/compiler-rt/test/asan/TestCases/throw_invoke_test.cpp b/compiler-rt/test/asan/TestCases/throw_invoke_test.cpp
index 3f832e9b5ffe6..a9069e1ca8d1a 100644
--- a/compiler-rt/test/asan/TestCases/throw_invoke_test.cpp
+++ b/compiler-rt/test/asan/TestCases/throw_invoke_test.cpp
@@ -1,5 +1,5 @@
// RUN: %clangxx_asan %s -o %t && %run %t
-// RUN: %clangxx_asan %s -o %t %linux_static_libstdcplusplus && %run %t
+// RUN: %clangxx_asan %s -o %t -static-libstdc++ && %run %t
// Investigate why it fails with NDK 21.
// UNSUPPORTED: android
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index 432f738895843..979659b1e3f30 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -646,14 +646,6 @@ def is_windows_lto_supported():
config.substitutions.append( ("%xdynamiclib_filename" + postfix, 'lib%xdynamiclib_namespec{}.so'.format(postfix)) )
config.substitutions.append( ("%xdynamiclib_namespec", '%basename_t.dynamic') )
-# Provide a substitution that can be used to tell Clang to use a static libstdc++.
-# The substitution expands to nothing on non Linux platforms.
-# FIXME: This should check the target OS, not the host OS.
-if config.host_os == 'Linux':
- config.substitutions.append( ("%linux_static_libstdcplusplus", "-stdlib=libstdc++ -static-libstdc++") )
-else:
- config.substitutions.append( ("%linux_static_libstdcplusplus", "") )
-
config.default_sanitizer_opts = []
if config.host_os == 'Darwin':
# On Darwin, we default to `abort_on_error=1`, which would make tests run
More information about the llvm-commits
mailing list