summaryrefslogtreecommitdiff
path: root/test/asan
diff options
context:
space:
mode:
Diffstat (limited to 'test/asan')
-rw-r--r--test/asan/CMakeLists.txt2
-rw-r--r--test/asan/lit.cfg7
2 files changed, 7 insertions, 2 deletions
diff --git a/test/asan/CMakeLists.txt b/test/asan/CMakeLists.txt
index 19d9c88cf..8bfc15b5c 100644
--- a/test/asan/CMakeLists.txt
+++ b/test/asan/CMakeLists.txt
@@ -18,7 +18,7 @@ if (SHADOW_MAPPING_UNRELIABLE)
endif()
macro(get_bits_for_arch arch bits)
- if (${arch} MATCHES "i386|arm|mips|mipsel")
+ if (${arch} MATCHES "i386|i686|arm|mips|mipsel")
set(${bits} 32)
elseif (${arch} MATCHES "x86_64|powerpc64|powerpc64le|aarch64|mips64|mips64el|s390x")
set(${bits} 64)
diff --git a/test/asan/lit.cfg b/test/asan/lit.cfg
index c7c5036b6..e25dd297a 100644
--- a/test/asan/lit.cfg
+++ b/test/asan/lit.cfg
@@ -121,11 +121,16 @@ else:
def build_invocation(compile_flags):
return " " + " ".join([config.compile_wrapper, config.clang] + compile_flags) + " "
+# Clang driver link 'x86' (i686) architecture to 'i386'.
+target_arch = config.target_arch
+if (target_arch == "i686"):
+ target_arch = "i386"
+
config.substitutions.append( ("%clang ", build_invocation(target_cflags)) )
config.substitutions.append( ("%clangxx ", build_invocation(target_cxxflags)) )
config.substitutions.append( ("%clang_asan ", build_invocation(clang_asan_cflags)) )
config.substitutions.append( ("%clangxx_asan ", build_invocation(clang_asan_cxxflags)) )
-config.substitutions.append( ("%shared_libasan", "libclang_rt.asan-%s.so" % config.target_arch))
+config.substitutions.append( ("%shared_libasan", "libclang_rt.asan-%s.so" % target_arch))
if config.asan_dynamic:
config.substitutions.append( ("%clang_asan_static ", build_invocation(clang_asan_static_cflags)) )
config.substitutions.append( ("%clangxx_asan_static ", build_invocation(clang_asan_static_cxxflags)) )