summaryrefslogtreecommitdiff
path: root/test/lit.common.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.common.cfg')
-rw-r--r--test/lit.common.cfg11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/lit.common.cfg b/test/lit.common.cfg
index b4cf396c9..02a3cd613 100644
--- a/test/lit.common.cfg
+++ b/test/lit.common.cfg
@@ -121,13 +121,20 @@ def is_linux_lto_supported():
return True
-if sys.platform == 'darwin' and is_darwin_lto_supported():
+def is_windows_lto_supported():
+ return os.path.exists(os.path.join(config.llvm_tools_dir, 'lld-link2.exe'))
+
+if config.host_os == 'Darwin' and is_darwin_lto_supported():
config.lto_supported = True
config.lto_launch = ["env", "DYLD_LIBRARY_PATH=" + config.llvm_shlib_dir]
config.lto_flags = []
-elif sys.platform.startswith('linux') and is_linux_lto_supported():
+elif config.host_os == 'Linux' and is_linux_lto_supported():
config.lto_supported = True
config.lto_launch = []
config.lto_flags = ["-fuse-ld=gold"]
+elif config.host_os == 'Windows' and is_windows_lto_supported():
+ config.lto_supported = True
+ config.lto_launch = []
+ config.lto_flags = ["-fuse-ld=lld-link2"]
else:
config.lto_supported = False