diff --git a/compiler-rt/test/asan/lit.cfg.py b/compiler-rt/test/asan/lit.cfg.py --- a/compiler-rt/test/asan/lit.cfg.py +++ b/compiler-rt/test/asan/lit.cfg.py @@ -247,3 +247,10 @@ if config.host_os == 'NetBSD': config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix)) + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" diff --git a/compiler-rt/test/cfi/lit.cfg.py b/compiler-rt/test/cfi/lit.cfg.py --- a/compiler-rt/test/cfi/lit.cfg.py +++ b/compiler-rt/test/cfi/lit.cfg.py @@ -48,3 +48,10 @@ if lit_config.params.get('check_supported', None) and config.unsupported: raise BaseException("Tests unsupported") + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" diff --git a/compiler-rt/test/dfsan/lit.cfg.py b/compiler-rt/test/dfsan/lit.cfg.py --- a/compiler-rt/test/dfsan/lit.cfg.py +++ b/compiler-rt/test/dfsan/lit.cfg.py @@ -26,3 +26,10 @@ # DataFlowSanitizer tests are currently supported on Linux only. if not (config.host_os in ['Linux'] and config.target_arch in ['aarch64', 'x86_64']): config.unsupported = True + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" diff --git a/compiler-rt/test/fuzzer/lit.cfg.py b/compiler-rt/test/fuzzer/lit.cfg.py --- a/compiler-rt/test/fuzzer/lit.cfg.py +++ b/compiler-rt/test/fuzzer/lit.cfg.py @@ -124,3 +124,10 @@ if config.host_os == 'NetBSD': config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix)) + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" diff --git a/compiler-rt/test/gwp_asan/lit.cfg.py b/compiler-rt/test/gwp_asan/lit.cfg.py --- a/compiler-rt/test/gwp_asan/lit.cfg.py +++ b/compiler-rt/test/gwp_asan/lit.cfg.py @@ -54,3 +54,10 @@ # GWP-ASan tests are currently supported on Linux only. if config.host_os not in ['Linux']: config.unsupported = True + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" diff --git a/compiler-rt/test/hwasan/lit.cfg.py b/compiler-rt/test/hwasan/lit.cfg.py --- a/compiler-rt/test/hwasan/lit.cfg.py +++ b/compiler-rt/test/hwasan/lit.cfg.py @@ -56,3 +56,10 @@ if config.host_os not in ['Linux', 'Android'] or not config.has_lld: config.unsupported = True + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" diff --git a/compiler-rt/test/msan/lit.cfg.py b/compiler-rt/test/msan/lit.cfg.py --- a/compiler-rt/test/msan/lit.cfg.py +++ b/compiler-rt/test/msan/lit.cfg.py @@ -51,3 +51,10 @@ if config.host_os == 'NetBSD': config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix)) + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" diff --git a/compiler-rt/test/safestack/lit.cfg.py b/compiler-rt/test/safestack/lit.cfg.py --- a/compiler-rt/test/safestack/lit.cfg.py +++ b/compiler-rt/test/safestack/lit.cfg.py @@ -20,3 +20,10 @@ if config.host_os not in ['Linux', 'FreeBSD', 'NetBSD']: config.unsupported = True + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" diff --git a/compiler-rt/test/scudo/lit.cfg.py b/compiler-rt/test/scudo/lit.cfg.py --- a/compiler-rt/test/scudo/lit.cfg.py +++ b/compiler-rt/test/scudo/lit.cfg.py @@ -62,3 +62,10 @@ # Hardened Allocator tests are currently supported on Linux only. if config.host_os not in ['Linux']: config.unsupported = True + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" diff --git a/compiler-rt/test/shadowcallstack/lit.cfg.py b/compiler-rt/test/shadowcallstack/lit.cfg.py --- a/compiler-rt/test/shadowcallstack/lit.cfg.py +++ b/compiler-rt/test/shadowcallstack/lit.cfg.py @@ -21,3 +21,10 @@ if config.host_os not in ['Linux'] or config.target_arch not in ['aarch64']: config.unsupported = True + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" diff --git a/compiler-rt/test/tsan/lit.cfg.py b/compiler-rt/test/tsan/lit.cfg.py --- a/compiler-rt/test/tsan/lit.cfg.py +++ b/compiler-rt/test/tsan/lit.cfg.py @@ -92,3 +92,10 @@ if config.host_os == 'NetBSD': config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix)) + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" diff --git a/compiler-rt/test/xray/lit.cfg.py b/compiler-rt/test/xray/lit.cfg.py --- a/compiler-rt/test/xray/lit.cfg.py +++ b/compiler-rt/test/xray/lit.cfg.py @@ -64,3 +64,10 @@ if config.host_os == 'NetBSD': config.substitutions.insert(0, ('%run', config.netbsd_nomprotect_prefix)) + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"