From fd99206ee402b1755a1f187f801d6613485de5b6 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Fri, 31 Jan 2014 11:44:32 +0000 Subject: [PATCH] [ASan] Run LSan for ASan unit tests only on 64-bit Linux llvm-svn: 200537 --- compiler-rt/lib/asan/lit_tests/Unit/lit.site.cfg.in | 3 ++- compiler-rt/lib/lit.common.unit.configured.in | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/asan/lit_tests/Unit/lit.site.cfg.in b/compiler-rt/lib/asan/lit_tests/Unit/lit.site.cfg.in index a45870c9b0e1..6e4adfc4ced7 100644 --- a/compiler-rt/lib/asan/lit_tests/Unit/lit.site.cfg.in +++ b/compiler-rt/lib/asan/lit_tests/Unit/lit.site.cfg.in @@ -12,5 +12,6 @@ config.name = 'AddressSanitizer-Unit' config.test_exec_root = "@ASAN_BINARY_DIR@/tests" config.test_source_root = config.test_exec_root -if config.host_os == 'Linux': +# Enable leak detection in ASan unit tests on x86_64-linux. +if config.host_os == 'Linux' and config.host_arch == 'x86_64': config.environment['ASAN_OPTIONS'] = 'detect_leaks=1' diff --git a/compiler-rt/lib/lit.common.unit.configured.in b/compiler-rt/lib/lit.common.unit.configured.in index 430816b24280..f2c5373f34ba 100644 --- a/compiler-rt/lib/lit.common.unit.configured.in +++ b/compiler-rt/lib/lit.common.unit.configured.in @@ -8,6 +8,7 @@ config.llvm_obj_root = "@LLVM_BINARY_DIR@" config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@" config.llvm_build_mode = "@LLVM_BUILD_MODE@" +config.host_arch = "@HOST_ARCH@" config.host_os = "@HOST_OS@" # LLVM tools dir and build mode can be passed in lit parameters,