Index: compiler-rt/trunk/test/cfi/CMakeLists.txt =================================================================== --- compiler-rt/trunk/test/cfi/CMakeLists.txt +++ compiler-rt/trunk/test/cfi/CMakeLists.txt @@ -1,6 +1,6 @@ set(CFI_TESTSUITES) -macro (add_cfi_test_suites lld thinlto) +macro (add_cfi_test_suites lld thinlto newpm) set(suffix) if (${lld}) set(suffix ${suffix}-lld) @@ -8,10 +8,14 @@ if (${thinlto}) set(suffix ${suffix}-thinlto) endif() + if (${newpm}) + set(suffix ${suffix}-newpm) + endif() set(suffix ${suffix}-${CFI_TEST_TARGET_ARCH}) set(CFI_TEST_USE_LLD ${lld}) set(CFI_TEST_USE_THINLTO ${thinlto}) + set(CFI_TEST_USE_NEWPM ${newpm}) set(CFI_LIT_TEST_MODE Standalone) set(CFI_TEST_CONFIG_SUFFIX -standalone${suffix}) @@ -40,16 +44,18 @@ get_test_cc_for_arch(${arch} CFI_TEST_TARGET_CC CFI_TEST_TARGET_CFLAGS) if (APPLE) # FIXME: enable ThinLTO tests after fixing http://llvm.org/pr32741 - add_cfi_test_suites(False False) + add_cfi_test_suites(False False False) elseif(WIN32) - add_cfi_test_suites(True False) - add_cfi_test_suites(True True) + add_cfi_test_suites(True False False) + add_cfi_test_suites(True True False) else() - add_cfi_test_suites(False False) - add_cfi_test_suites(False True) + add_cfi_test_suites(False False False) + add_cfi_test_suites(False True False) + add_cfi_test_suites(False False True) + add_cfi_test_suites(False True True) if (COMPILER_RT_HAS_LLD AND NOT arch STREQUAL "i386") - add_cfi_test_suites(True False) - add_cfi_test_suites(True True) + add_cfi_test_suites(True False False) + add_cfi_test_suites(True True False) endif() endif() endforeach() Index: compiler-rt/trunk/test/cfi/lit.site.cfg.in =================================================================== --- compiler-rt/trunk/test/cfi/lit.site.cfg.in +++ compiler-rt/trunk/test/cfi/lit.site.cfg.in @@ -7,6 +7,7 @@ config.use_lld = @CFI_TEST_USE_LLD@ config.use_lto = True # CFI *requires* LTO. config.use_thinlto = @CFI_TEST_USE_THINLTO@ +config.use_newpm = @CFI_TEST_USE_NEWPM@ lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured") lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg") Index: compiler-rt/trunk/test/lit.common.cfg =================================================================== --- compiler-rt/trunk/test/lit.common.cfg +++ compiler-rt/trunk/test/lit.common.cfg @@ -317,6 +317,9 @@ else: config.lto_flags += ["-flto"] +if config.use_newpm: + config.lto_flags += ["-fexperimental-new-pass-manager"] + # Ask llvm-config about assertion mode. try: llvm_config_cmd = subprocess.Popen( Index: compiler-rt/trunk/test/lit.common.configured.in =================================================================== --- compiler-rt/trunk/test/lit.common.configured.in +++ compiler-rt/trunk/test/lit.common.configured.in @@ -34,6 +34,7 @@ set_default("use_lld", False) set_default("use_thinlto", False) set_default("use_lto", config.use_thinlto) +set_default("use_newpm", False) set_default("android", @ANDROID_PYBOOL@) config.available_features.add('target-is-%s' % config.target_arch)