From 95478dccfc320cf3a2031fe7d263d7e839f4020a Mon Sep 17 00:00:00 2001 From: Adam Simpkins Date: Mon, 16 Sep 2019 21:07:54 -0700 Subject: [PATCH] add a command line option to disable the build cache Summary: This is useful when working on changes to some of the builder functions, to skip ever trying to use cached results. Reviewed By: chadaustin Differential Revision: D17401219 fbshipit-source-id: fb7d5ea45618653957b9bd6a62eed91d8334824d --- build/fbcode_builder/getdeps.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/fbcode_builder/getdeps.py b/build/fbcode_builder/getdeps.py index 4a19b00ac..0cb2ed8fd 100755 --- a/build/fbcode_builder/getdeps.py +++ b/build/fbcode_builder/getdeps.py @@ -356,7 +356,7 @@ class BuildCmd(ProjectCmdBase): print("Building on %s" % loader.ctx_gen.get_context(args.project)) projects = loader.manifests_in_dependency_order() - cache = cache_module.create_cache() + cache = cache_module.create_cache() if args.use_build_cache else None # Accumulate the install directories so that the build steps # can find their dep installation @@ -456,6 +456,13 @@ class BuildCmd(ProjectCmdBase): "slow up-to-date-ness checks" ), ) + parser.add_argument( + "--no-build-cache", + action="store_false", + default=True, + dest="use_build_cache", + help="Do not attempt to use the build cache.", + ) parser.add_argument( "--schedule-type", help="Indicates how the build was activated" )