The env variables used by the Infer backend were only passed in multicore mode

Summary:
public
The env variables used by the Infer backend were only passed in multicore mode. They are now passed before the generation of clusters, whether in single core mode or in multicore mode.

Reviewed By: cristianoc

Differential Revision: D2891816

fb-gh-sync-id: 25074af
master
jrm 9 years ago committed by facebook-github-bot-1
parent 7938fbb344
commit 5da7823df5

@ -430,6 +430,12 @@ class Infer:
elif self.args.project_root: elif self.args.project_root:
infer_options += ['-project_root', self.args.project_root] infer_options += ['-project_root', self.args.project_root]
if self.args.analyzer in [config.ANALYZER_CHECKERS,
config.ANALYZER_ERADICATE]:
os.environ['INFER_ONDEMAND'] = 'Y'
os.environ['INFER_OPTIONS'] = ' '.join(infer_options)
if self.args.multicore == 1: if self.args.multicore == 1:
analysis_start_time = time.time() analysis_start_time = time.time()
analyze_cmd = infer_analyze + infer_options analyze_cmd = infer_analyze + infer_options
@ -445,12 +451,6 @@ class Infer:
self.timing['makefile_generation'] = 0 self.timing['makefile_generation'] = 0
else: else:
if self.args.analyzer in [config.ANALYZER_CHECKERS,
config.ANALYZER_ERADICATE]:
os.environ['INFER_ONDEMAND'] = 'Y'
os.environ['INFER_OPTIONS'] = ' '.join(infer_options)
multicore_dir = os.path.join(self.args.infer_out, 'multicore') multicore_dir = os.path.join(self.args.infer_out, 'multicore')
pwd = os.getcwd() pwd = os.getcwd()
if os.path.isdir(multicore_dir): if os.path.isdir(multicore_dir):

Loading…
Cancel
Save