From 86606fbe22c76d71851a38003462e9b6428b47d3 Mon Sep 17 00:00:00 2001 From: Michael Andreas Dagitses Date: Wed, 15 Jun 2022 17:36:30 -0700 Subject: [PATCH] fix generate-code caching by indicating that the binary is an executable Pull Request resolved: https://github.com/pytorch/pytorch/pull/79625 Per Josiah Gaskin's followup on https://www.internalfb.com/intern/qa/365579, using $(exe ...) instead of $(location ...) should address the caching behavior. @override-unit-failures (Note: this ignores all push blocking failures!) Differential Revision: [D36970846](https://our.internmc.facebook.com/intern/diff/D36970846/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D36970846/)! Approved by: https://github.com/malfet --- build.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.bzl b/build.bzl index b7fcbdb81f2942..a19fe044a56b3f 100644 --- a/build.bzl +++ b/build.bzl @@ -99,7 +99,7 @@ def define_targets(rules): ], tools = ["//tools/setup_helpers:generate_code"], outs = GENERATED_AUTOGRAD_CPP + GENERATED_AUTOGRAD_PYTHON + GENERATED_TESTING_PY, - cmd = "$(location //tools/setup_helpers:generate_code) " + + cmd = "$(execpath //tools/setup_helpers:generate_code) " + "--gen-dir=$(RULEDIR) " + "--native-functions-path $(location :native_functions.yaml) " + "--tags-path=$(location :tags.yaml) " +