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.cfg16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/lit.common.cfg b/test/lit.common.cfg
index d59d7d668..4b03a5504 100644
--- a/test/lit.common.cfg
+++ b/test/lit.common.cfg
@@ -129,6 +129,9 @@ if sanitizer_can_use_cxxabi:
config.available_features.add('cxxabi')
if config.has_lld:
+ config.available_features.add('lld-available')
+
+if config.use_lld:
config.available_features.add('lld')
if config.can_symbolize:
@@ -180,6 +183,9 @@ def is_darwin_lto_supported():
return os.path.exists(os.path.join(config.llvm_shlib_dir, 'libLTO.dylib'))
def is_linux_lto_supported():
+ if config.use_lld:
+ return True
+
if not os.path.exists(os.path.join(config.llvm_shlib_dir, 'LLVMgold.so')):
return False
@@ -202,7 +208,10 @@ if config.host_os == 'Darwin' and is_darwin_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"]
+ if config.use_lld:
+ config.lto_flags = ["-fuse-ld=lld"]
+ else:
+ config.lto_flags = ["-fuse-ld=gold"]
elif config.host_os == 'Windows' and is_windows_lto_supported():
config.lto_supported = True
config.lto_launch = []
@@ -213,6 +222,11 @@ else:
if config.lto_supported:
config.available_features.add('lto')
+ if config.use_thinlto:
+ config.available_features.add('thinlto')
+ config.lto_flags += ["-flto=thin"]
+ else:
+ config.lto_flags += ["-flto"]
# Ask llvm-config about assertion mode.
try: