diff --git a/compiler-rt/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc b/compiler-rt/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc index e25a676df3a78..e0907061bae26 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/Darwin/abort_on_error.cc @@ -4,7 +4,7 @@ // RUN: %clangxx -DUSING_%tool_name %s -o %t // Intentionally don't inherit the default options. -// RUN: env %tool_options='' not --crash %run %t 2>&1 +// RUN: env %tool_options='' TSAN_OPTIONS=ignore_interceptors_accesses=0 not --crash %run %t 2>&1 // When we use lit's default options, we shouldn't crash. // RUN: not %run %t 2>&1 diff --git a/compiler-rt/test/sanitizer_common/lit.common.cfg b/compiler-rt/test/sanitizer_common/lit.common.cfg index 85764ebaf29c6..f755ca5ec7173 100644 --- a/compiler-rt/test/sanitizer_common/lit.common.cfg +++ b/compiler-rt/test/sanitizer_common/lit.common.cfg @@ -35,7 +35,8 @@ if config.host_os == 'Darwin': # On Darwin, we default to `abort_on_error=1`, which would make tests run # much slower. Let's override this and run lit tests with 'abort_on_error=0'. default_tool_options += ['abort_on_error=0'] - default_tool_options += ['ignore_interceptors_accesses=0'] + if config.tool_name == "tsan": + default_tool_options += ['ignore_interceptors_accesses=0'] elif config.android: # The same as on Darwin, we default to "abort_on_error=1" which slows down # testing. Also, all existing tests are using "not" instead of "not --crash"