Skip to content

Commit

Permalink
[asan] Don't use libstdc++ in test
Browse files Browse the repository at this point in the history
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
  • Loading branch information
abrachet committed May 19, 2023
1 parent 7084fb1 commit 4df44a0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion compiler-rt/test/asan/TestCases/throw_invoke_test.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 0 additions & 8 deletions compiler-rt/test/lit.common.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4df44a0

Please sign in to comment.