aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Alex Humesky <ahumesky@google.com>2016-02-16 23:59:48 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-02-17 09:55:30 +0000
commit291032ae5dd7776422d692298d36d3dae96b39ed (patch)
tree6334c2223f563983201792fead1a913681066f74 /src
parent74a39f09e87aa8c0698610046bd8119619a9d2c8 (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.java5
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))