From d05b1f172a9919e7a379243ebc8d14ae05ba3027 Mon Sep 17 00:00:00 2001 From: Martino Luca Date: Fri, 14 Oct 2016 01:34:26 -0700 Subject: [PATCH] [Infer][Buck] Invoke buck with *//cxx.pch_enabled=false to disable the use of precompiled headers Reviewed By: mzlee Differential Revision: D4015308 fbshipit-source-id: 6c2a6fe --- infer/lib/python/inferlib/capture/buck.py | 2 ++ infer/src/integration/BuckCompilationDatabase.ml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/infer/lib/python/inferlib/capture/buck.py b/infer/lib/python/inferlib/capture/buck.py index dc05ae4e0..d81e58603 100644 --- a/infer/lib/python/inferlib/capture/buck.py +++ b/infer/lib/python/inferlib/capture/buck.py @@ -128,6 +128,8 @@ class BuckAnalyzer: '*//infer.clang_compiler={clang}'.format(clang=clang_path), '--config', '*//infer.clang_plugin={plugin}'.format(plugin=plugin_path), + '--config', + '*//cxx.pch_enabled=false', ] + self.args.Xbuck if self.args.xcode_developer_dir is not None: diff --git a/infer/src/integration/BuckCompilationDatabase.ml b/infer/src/integration/BuckCompilationDatabase.ml index 56cb7f00a..582fbac32 100644 --- a/infer/src/integration/BuckCompilationDatabase.ml +++ b/infer/src/integration/BuckCompilationDatabase.ml @@ -163,7 +163,8 @@ let get_compilation_database changed_files = | buck :: build :: args -> (check_args_for_targets args; let args_with_flavor = add_flavor_to_targets args in - let buck_build = Array.of_list (buck :: build :: args_with_flavor) in + let buck_build = Array.of_list + (buck :: build :: "--config" :: "*//cxx.pch_enabled=false" :: args_with_flavor) in Process.create_process_and_wait buck_build; let buck_targets_list = buck :: "targets" :: "--show-output" :: args_with_flavor in let buck_targets = String.concat " " buck_targets_list in