Index: clang-tools-extra/test/lit.site.cfg.in =================================================================== --- clang-tools-extra/test/lit.site.cfg.in +++ clang-tools-extra/test/lit.site.cfg.in @@ -23,7 +23,8 @@ key, = e.args lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) -@LIT_SITE_CFG_IN_FOOTER@ +import lit +lit.llvm.initialize(lit_config, config) # Let the main config do the real work. lit_config.load_config(config, "@CLANG_TOOLS_SOURCE_DIR@/test/lit.cfg") Index: clang/test/lit.site.cfg.py.in =================================================================== --- clang/test/lit.site.cfg.py.in +++ clang/test/lit.site.cfg.py.in @@ -40,7 +40,8 @@ key, = e.args lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) -@LIT_SITE_CFG_IN_FOOTER@ +import lit +lit.llvm.initialize(lit_config, config) # Let the main config do the real work. lit_config.load_config(config, "@CLANG_SOURCE_DIR@/test/lit.cfg.py") Index: lld/test/lit.site.cfg.py.in =================================================================== --- lld/test/lit.site.cfg.py.in +++ lld/test/lit.site.cfg.py.in @@ -25,7 +25,8 @@ key, = e.args lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) -@LIT_SITE_CFG_IN_FOOTER@ +import lit +lit.llvm.initialize(lit_config, config) # Let the main config do the real work. lit_config.load_config(config, "@LLD_SOURCE_DIR@/test/lit.cfg.py") Index: llvm/cmake/modules/AddLLVM.cmake =================================================================== --- llvm/cmake/modules/AddLLVM.cmake +++ llvm/cmake/modules/AddLLVM.cmake @@ -1243,10 +1243,6 @@ set(TARGET_TRIPLE "\"+config.target_triple+\"") endif() - string(CONCAT LIT_SITE_CFG_IN_FOOTER - "import lit.llvm\n" - "lit.llvm.initialize(lit_config, config)\n") - configure_file(${site_in} ${site_out} @ONLY) if (EXISTS "${ARG_MAIN_CONFIG}") set(PYTHON_STATEMENT "map_config('${ARG_MAIN_CONFIG}', '${site_out}')") Index: llvm/test/lit.site.cfg.py.in =================================================================== --- llvm/test/lit.site.cfg.py.in +++ llvm/test/lit.site.cfg.py.in @@ -54,7 +54,8 @@ key, = e.args lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) -@LIT_SITE_CFG_IN_FOOTER@ +import lit +lit.llvm.initialize(lit_config, config) # Let the main config do the real work. lit_config.load_config(config, "@LLVM_SOURCE_DIR@/test/lit.cfg.py")