[infer][genrule] add an option to make the genrule integration compatible with the Buck cache

Summary: When passing `--genrule-mode` option, Infer will remove the logs and the other kind of data that are not compatible with the Buck distributed cache.

Reviewed By: mbouaziz

Differential Revision: D7943346

fbshipit-source-id: 4e7ca4d
master
Jeremy Dubreil 7 years ago committed by Facebook Github Bot
parent 8162cf826e
commit ed0c550905

@ -40,6 +40,7 @@ def create_infer_genrule(
srcs=srcs,
cmd = ' '.join([
os.getenv('INFER_BIN', 'infer'),
'--genrule-mode',
'--project-root', os.getenv('PROJECT_ROOT', os.environ['PWD']),
'--eradicate-only',
'--results-dir', '$OUT',

@ -1346,6 +1346,11 @@ and generated_classes =
"Specify where to load the generated class files"
and genrule_mode =
CLOpt.mk_bool ~default:false ~long:"genrule-mode"
"Enable the genrule compatibility mode used for the Buck integration"
and headers =
CLOpt.mk_bool ~deprecated:["headers"; "hd"] ~deprecated_no:["no_headers"; "nhd"] ~long:"headers"
~in_help:InferCommand.[(Capture, manual_clang)]
@ -2428,7 +2433,7 @@ and buck = !buck
and buck_build_args = !buck_build_args
and buck_cache_mode = !buck && not !debug
and buck_cache_mode = (!buck || !genrule_mode) && not !debug
and buck_compilation_database =
match !buck_compilation_database with

Loading…
Cancel
Save