diff --git a/infer/src/clang/ClangCommand.ml b/infer/src/clang/ClangCommand.ml index d22350eac..b1ed8a051 100644 --- a/infer/src/clang/ClangCommand.ml +++ b/infer/src/clang/ClangCommand.ml @@ -190,7 +190,9 @@ let mk ~is_driver quoting_style ~prog ~args = let sanitized_args = filter_and_replace_unsupported_args ~blacklisted_flags:clang_blacklisted_flags ~blacklisted_flags_with_arg args - @ List.rev Config.clang_extra_flags + in + let sanitized_args = + if is_driver then sanitized_args @ List.rev Config.clang_extra_flags else sanitized_args in {exec= prog; orig_argv= sanitized_args; argv= sanitized_args; quoting_style; is_driver} diff --git a/infer/tests/build_systems/assembly/Makefile b/infer/tests/build_systems/assembly/Makefile index fe9da9376..222b5de0b 100644 --- a/infer/tests/build_systems/assembly/Makefile +++ b/infer/tests/build_systems/assembly/Makefile @@ -7,7 +7,7 @@ TESTS_DIR = ../.. ANALYZER = checkers CLANG_OPTIONS = -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze +INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --Xclang -U --Xclang __SSE2__ INFERPRINT_OPTIONS = --issues-tests SOURCES = \