From c9be3c9f941acd05ac85575b0cc1cc5527284f29 Mon Sep 17 00:00:00 2001 From: Dulma Churchill Date: Tue, 3 Oct 2017 07:40:32 -0700 Subject: [PATCH] [integration] Support buck integration with compilation db when passing @mode/... arguments Reviewed By: jvillard Differential Revision: D5963497 fbshipit-source-id: 8af9f9c --- infer/src/integration/CaptureCompilationDatabase.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/infer/src/integration/CaptureCompilationDatabase.ml b/infer/src/integration/CaptureCompilationDatabase.ml index d4faab4d4..1fc036cb1 100644 --- a/infer/src/integration/CaptureCompilationDatabase.ml +++ b/infer/src/integration/CaptureCompilationDatabase.ml @@ -92,7 +92,7 @@ let get_compilation_database_files_buck ~prog ~args = -> Buck.add_flavors_to_buck_command targets in match no_targets with - | "build" :: _ + | "build" :: no_targets_no_build -> ( let targets_in_file = Buck.store_targets_in_file targets in let build_args = no_targets @ ["--config"; "*//cxx.pch_enabled=false"; targets_in_file] in @@ -100,7 +100,8 @@ let get_compilation_database_files_buck ~prog ~args = "Processed buck command is : 'buck %s'@\n" (String.concat ~sep:" " build_args) ; Process.create_process_and_wait ~prog ~args:build_args ; let buck_targets_shell = - [prog; "targets"; "--show-output"; targets_in_file] |> Utils.shell_escape_command + List.append [prog; "targets"; "--show-output"; targets_in_file] no_targets_no_build + |> Utils.shell_escape_command in let output, exit_or_signal = Utils.with_process_in buck_targets_shell In_channel.input_lines