Index: compiler-rt/test/asan/CMakeLists.txt =================================================================== --- compiler-rt/test/asan/CMakeLists.txt +++ compiler-rt/test/asan/CMakeLists.txt @@ -41,6 +41,8 @@ darwin_filter_host_archs(ASAN_SUPPORTED_ARCH ASAN_TEST_ARCH) endif() +set(ASAN_TEST_SHADOW_SCALE ${LLVM_ASAN_SHADOW_SCALE}) + foreach(arch ${ASAN_TEST_ARCH}) if(ANDROID) set(ASAN_TEST_TARGET_ARCH ${arch}-android) Index: compiler-rt/test/asan/lit.cfg =================================================================== --- compiler-rt/test/asan/lit.cfg +++ compiler-rt/test/asan/lit.cfg @@ -162,6 +162,10 @@ else: kernel_bits = '32' +# Detect custom shadow scale +if config.asan_shadow_scale != '3': + config.available_features.add("custom-shadow-scale") + config.substitutions.append( ('CHECK-%kernel_bits', ("CHECK-kernel-" + kernel_bits + "-bits"))) config.substitutions.append( ("%libdl", libdl_flag) ) Index: compiler-rt/test/asan/lit.site.cfg.in =================================================================== --- compiler-rt/test/asan/lit.site.cfg.in +++ compiler-rt/test/asan/lit.site.cfg.in @@ -9,6 +9,7 @@ config.iossim = @ASAN_TEST_IOSSIM_PYBOOL@ config.asan_dynamic = @ASAN_TEST_DYNAMIC@ config.target_arch = "@ASAN_TEST_TARGET_ARCH@" +config.asan_shadow_scale = "@ASAN_TEST_SHADOW_SCALE@" # Load common config for all compiler-rt lit tests. lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")