Index: compiler-rt/test/lit.common.cfg.py =================================================================== --- compiler-rt/test/lit.common.cfg.py +++ compiler-rt/test/lit.common.cfg.py @@ -577,6 +577,11 @@ elif config.use_lto and (not config.lto_supported): config.unsupported = True +# Pick any extra flags passed in lit_config +lit_config_cflags = lit_config.params.get('target_cflags', None) +if lit_config_cflags: + extra_cflags += [lit_config_cflags] + 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):