From 4ce997c8f05de7b3fd764d26f1c65ac9f550583c Mon Sep 17 00:00:00 2001 From: Andrzej Kotulski Date: Mon, 19 Jun 2017 06:16:51 -0700 Subject: [PATCH] [clang] blacklist -profile-guided-section-prefix Summary: Too new for our clang. Reviewed By: dulmarod Differential Revision: D5274081 fbshipit-source-id: 34a301c --- infer/src/clang/ClangCommand.re | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/infer/src/clang/ClangCommand.re b/infer/src/clang/ClangCommand.re index 81f3a53d0..e591101f3 100644 --- a/infer/src/clang/ClangCommand.re +++ b/infer/src/clang/ClangCommand.re @@ -91,6 +91,7 @@ let include_override_regex = Option.map f::Str.regexp Config.clang_include_to_ov let clang_cc1_cmd_sanitizer cmd => { /* command line options not supported by the opensource compiler or the plugins */ let flags_blacklist = ["-fembed-bitcode-marker", "-fno-canonical-system-headers"]; + let mllvm_flags_blacklist = ["-profile-guided-section-prefix"]; let replace_option_arg option arg => if (String.equal option "-arch" && String.equal arg "armv7k") { "armv7" @@ -138,6 +139,11 @@ let clang_cc1_cmd_sanitizer cmd => { List.rev_append res_rev (List.rev post_args_rev) | [flag, ...tl] when List.mem equal::String.equal flags_blacklist flag => filter_unsupported_args_and_swap_includes (flag, res_rev) tl + | [flag1, flag2, ...tl] + when + String.equal "-mllvm" flag1 && + List.exists f::(fun prefix => String.is_prefix ::prefix flag2) mllvm_flags_blacklist => + filter_unsupported_args_and_swap_includes (flag2, res_rev) tl | [arg, ...tl] => { let res_rev' = [replace_option_arg prev arg, ...res_rev]; filter_unsupported_args_and_swap_includes (arg, res_rev') tl