diff options
author | 2016-02-16 23:59:48 +0000 | |
---|---|---|
committer | 2016-02-17 09:55:30 +0000 | |
commit | 291032ae5dd7776422d692298d36d3dae96b39ed (patch) | |
tree | 6334c2223f563983201792fead1a913681066f74 /src | |
parent | 74a39f09e87aa8c0698610046bd8119619a9d2c8 (diff) |
Fixes genrules to work correctly with bazel run when the genrule's executable
attribute is set to true.
Fixes #918
RELNOTES: Genrules correctly work when used with bazel run.
--
MOS_MIGRATED_REVID=114803736
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java index 78cc7b948d..dd0d2b2de1 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java @@ -179,7 +179,10 @@ public final class BazelGenRuleRule implements RuleDefinition { </p> <p>Declaring data dependencies for the generated executable is not supported.</p> <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ - .add(attr("executable", BOOLEAN).value(false)) + .add(attr("executable", BOOLEAN).value(false).nonconfigurable( + "Used in computed default for $is_executable, which is itself non-configurable (and " + + " thus expects its dependencies to be non-configurable), because $is_executable" + + " is called from RunCommand.isExecutable, which has no configuration context")) // TODO(bazel-team): stamping doesn't seem to work. Fix it or remove attribute. .add(attr("stamp", BOOLEAN).value(false)) |