diff --git a/compiler-rt/test/cfi/lit.cfg.py b/compiler-rt/test/cfi/lit.cfg.py index cbffe6ea8a65a8..2f2d1ddcaa7920 100644 --- a/compiler-rt/test/cfi/lit.cfg.py +++ b/compiler-rt/test/cfi/lit.cfg.py @@ -13,7 +13,11 @@ def build_invocation(compile_flags): config.substitutions.append((r"%clang ", clang + ' ')) config.substitutions.append((r"%clangxx ", clangxx + ' ')) -if config.lto_supported: + +if 'darwin' in config.available_features: + # -fsanitize=cfi is not supported on Darwin hosts + config.unsupported = True +elif config.lto_supported: clang_cfi = clang + '-fsanitize=cfi ' if config.cfi_lit_test_mode == "Devirt":