mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 14:48:27 +08:00
[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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -646,14 +646,6 @@ for postfix in ["2", "1", ""]:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user