Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run clang with original optimizer, which is needed to verify Linux kernel #1781

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions infer/src/clang/Capture.ml
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@ let cc1_capture clang_cmd =


let capture clang_cmd =
if ClangCommand.can_attach_ast_exporter clang_cmd then
if ClangCommand.can_attach_ast_exporter clang_cmd then (
(* this command compiles some code; replace the invocation of clang with our own clang and
plugin *)
cc1_capture clang_cmd
cc1_capture clang_cmd ; (* to create AST *)
run_clang clang_cmd Utils.echo_in ; (* to run clang with original optimizer *)
() )
else if Option.exists Config.buck_mode ~f:BuckMode.is_clang_compilation_db then
(* when running with buck's compilation-database, skip commands where frontend cannot be
attached, as they may cause unnecessary compilation errors *)
Expand Down