Index: test/asan/TestCases/Linux/coverage-and-lsan.cc =================================================================== --- test/asan/TestCases/Linux/coverage-and-lsan.cc +++ test/asan/TestCases/Linux/coverage-and-lsan.cc @@ -8,7 +8,7 @@ // RUN: ASAN_OPTIONS=coverage=1:coverage_dir=%T/coverage-and-lsan:verbosity=1 not %run %t 2>&1 | FileCheck %s // RUN: %sancov print %T/coverage-and-lsan/*.sancov 2>&1 // -// REQUIRES: asan-64-bits +// REQUIRES: leak-detection int *g = new int; int main(int argc, char **argv) { Index: test/asan/TestCases/Linux/leak.cc =================================================================== --- test/asan/TestCases/Linux/leak.cc +++ test/asan/TestCases/Linux/leak.cc @@ -1,5 +1,5 @@ // Minimal test for LeakSanitizer+AddressSanitizer. -// REQUIRES: asan-64-bits +// REQUIRES: leak-detection // // RUN: %clangxx_asan %s -o %t // RUN: ASAN_OPTIONS=detect_leaks=1 not %run %t 2>&1 | FileCheck %s Index: test/asan/Unit/lit.site.cfg.in =================================================================== --- test/asan/Unit/lit.site.cfg.in +++ test/asan/Unit/lit.site.cfg.in @@ -22,7 +22,3 @@ # Set LD_LIBRARY_PATH to pick dynamic runtime up properly. push_ld_library_path(config, config.compiler_rt_libdir) - -# 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' Index: test/asan/lit.cfg =================================================================== --- test/asan/lit.cfg +++ test/asan/lit.cfg @@ -123,8 +123,8 @@ config.available_features.add('stable-runtime') # Turn on leak detection on 64-bit Linux. -if config.host_os == 'Linux' and config.bits == '64': - config.environment['ASAN_OPTIONS'] = 'detect_leaks=1' +if config.host_os == 'Linux' and config.target_arch == 'x86_64': + config.available_features.add('leak-detection') # Set LD_LIBRARY_PATH to pick dynamic runtime up properly. push_ld_library_path(config, config.compiler_rt_libdir) Index: test/lsan/lit.common.cfg =================================================================== --- test/lsan/lit.common.cfg +++ test/lsan/lit.common.cfg @@ -25,7 +25,6 @@ config.name = "LeakSanitizer-AddressSanitizer" lsan_cflags = ["-fsanitize=address"] config.available_features.add('asan') - config.environment['ASAN_OPTIONS'] = 'detect_leaks=1' else: lit_config.fatal("Unknown LSan test mode: %r" % lsan_lit_test_mode)