diff options
Diffstat (limited to 'test/lit.common.cfg')
-rw-r--r-- | test/lit.common.cfg | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/lit.common.cfg b/test/lit.common.cfg index 56d4fef4e..0840f65a7 100644 --- a/test/lit.common.cfg +++ b/test/lit.common.cfg @@ -324,3 +324,22 @@ if config.asan_shadow_scale: config.available_features.add("shadow-scale-%s" % config.asan_shadow_scale) else: config.available_features.add("shadow-scale-3") + +# Propagate the LLD/LTO into the clang config option, so nothing else is needed. +run_wrapper = [] +target_cflags = [getattr(config, 'target_cflags', None)] +extra_cflags = [] + +if config.use_lto and config.lto_supported: + run_wrapper += config.lto_launch + extra_cflags += config.lto_flags +elif config.use_lto and (not config.lto_supported): + config.unsupported = True + +if config.use_lld and config.has_lld and not config.use_lto: + extra_cflags += ["-fuse-ld=lld"] +elif config.use_lld and (not config.has_lld): + config.unsupported = True + +config.clang = " " + " ".join(run_wrapper + [config.compile_wrapper, config.clang]) + " " +config.target_cflags = " " + " ".join(target_cflags + extra_cflags) + " " |