From b81b3f479104e1132ac28e53e311f5f3de6deb9e Mon Sep 17 00:00:00 2001 From: Andrzej Kotulski Date: Fri, 3 Jun 2016 02:25:40 -0700 Subject: [PATCH] Always run C compiler with -fsyntax-only Summary: buck #infer flavor doesn't rely on .o files so we don't need to generate them. It will save memory/IO and possibly time Reviewed By: jvillard, martinoluca Differential Revision: D3379463 fbshipit-source-id: 1d48f7a --- infer/lib/python/inferlib/capture/buck.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infer/lib/python/inferlib/capture/buck.py b/infer/lib/python/inferlib/capture/buck.py index b4c65bd82..04badf560 100644 --- a/infer/lib/python/inferlib/capture/buck.py +++ b/infer/lib/python/inferlib/capture/buck.py @@ -155,8 +155,11 @@ class BuckAnalyzer: print('Please run this command from the folder where .buckconfig ' 'is located') return os.EX_USAGE + env_vars = utils.read_env() + env_vars['FCP_RUN_SYNTAX_ONLY'] = '1' + env = utils.encode_env(env_vars) subprocess.check_call( - self.cmd + self.create_cxx_buck_configuration_args()) + self.cmd + self.create_cxx_buck_configuration_args(), env=env) return os.EX_OK def capture_with_flavors(self):