diff options
author | jcater <jcater@google.com> | 2018-06-19 12:15:55 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-19 12:17:17 -0700 |
commit | 0fb66160de7cd6013c0d719376c47b3a66a874dc (patch) | |
tree | e990405799ab179637054218cb2468cb022802d5 /src/main/java/com/google/devtools/build/lib/packages | |
parent | 61044a00d5fe556382778f01d7113f0395a12a96 (diff) |
Add more logging when executionPlatformConstraintsAllowed is set to PER_TARGET
but the "exec_compatible_with" attribute is present.
PiperOrigin-RevId: 201219412
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/RuleClass.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java index d838923691..75fd947223 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java +++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java @@ -766,8 +766,9 @@ public class RuleClass { // Only rules that allow per target execution constraints need this attribute. Preconditions.checkState( !this.attributes.containsKey("exec_compatible_with"), - "Rule should not already define the attribute \"exec_compatible_with\"" - + " if executionPlatformConstraintsAllowed is set to PER_TARGET"); + "Rule %s should not already define the attribute \"exec_compatible_with\"" + + " because executionPlatformConstraintsAllowed is set to PER_TARGET", + key); this.add( attr("exec_compatible_with", BuildType.LABEL_LIST) .allowedFileTypes() |