diff --git a/test/lit.cfg.py b/test/lit.cfg.py index 3c154c5899e..4200dd57dc4 100644 --- a/test/lit.cfg.py +++ b/test/lit.cfg.py @@ -278,7 +278,10 @@ if have_ld_plugin_support(): def have_ld64_plugin_support(): - if not config.llvm_tool_lto_build or config.ld64_executable == '': + if not os.path.exists(os.path.join(config.llvm_shlib_dir, 'libLTO' + config.llvm_shlib_ext)): + return False + + if config.ld64_executable == '': return False ld_cmd = subprocess.Popen( diff --git a/test/lit.site.cfg.py.in b/test/lit.site.cfg.py.in index 6592b3c450c..b8bfc1bd364 100644 --- a/test/lit.site.cfg.py.in +++ b/test/lit.site.cfg.py.in @@ -15,7 +15,6 @@ config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" config.python_executable = "@PYTHON_EXECUTABLE@" config.gold_executable = "@GOLD_EXECUTABLE@" config.ld64_executable = "@LD64_EXECUTABLE@" -config.llvm_tool_lto_build = @LLVM_TOOL_LTO_BUILD@ config.ocamlfind_executable = "@OCAMLFIND@" config.have_ocamlopt = @HAVE_OCAMLOPT@ config.have_ocaml_ounit = @HAVE_OCAML_OUNIT@ diff --git a/utils/gn/secondary/llvm/test/BUILD.gn b/utils/gn/secondary/llvm/test/BUILD.gn index b6f75746781..2671982a7bb 100644 --- a/utils/gn/secondary/llvm/test/BUILD.gn +++ b/utils/gn/secondary/llvm/test/BUILD.gn @@ -59,7 +59,6 @@ write_lit_config("lit_site_cfg") { "LLVM_LINK_LLVM_DYLIB=0", "LLVM_LIT_TOOLS_DIR=", # Intentionally empty, matches cmake build. "LLVM_NATIVE_ARCH=$native_target", - "LLVM_TOOL_LTO_BUILD=1", # The GN build always builds //llvm/tools/lto. "LLVM_USE_INTEL_JITEVENTS=0", "LLVM_USE_SANITIZER=", "PYTHON_EXECUTABLE=$python_path",