[Buck][compilation-database] Do not run clang command that cannot be attached to the frontend

Reviewed By: jvillard

Differential Revision: D6100439

fbshipit-source-id: e52c4cb
master
Martino Luca 7 years ago committed by Facebook Github Bot
parent f89e687efa
commit 3df1e52928

@ -171,6 +171,10 @@ let capture clang_cmd =
(* this command compiles some code; replace the invocation of clang with our own clang and (* this command compiles some code; replace the invocation of clang with our own clang and
plugin *) plugin *)
cc1_capture clang_cmd cc1_capture clang_cmd
else if Option.is_some Config.buck_compilation_database then
(* when running with buck's compilation-database, skip commands where frontend cannot be
attached, as they may cause unnecessary compilation errors *)
()
else else
(* Non-compilation (eg, linking) command. Run the command as-is. It will not get captured (* Non-compilation (eg, linking) command. Run the command as-is. It will not get captured
further since `clang -### ...` will only output commands that invoke binaries using their further since `clang -### ...` will only output commands that invoke binaries using their

Loading…
Cancel
Save