diff options
author | gregce <gregce@google.com> | 2018-06-27 17:44:45 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-27 17:45:53 -0700 |
commit | bceecab895e9e196919cd8d7db5e810ae3334dcc (patch) | |
tree | 26e06f13663c005f6e67da14b8261cf5071a8be0 /src/main/java/com/google/devtools/build/lib/analysis/skylark | |
parent | 7bcb8eda43aad9318415c2be0596edfaac52bb9d (diff) |
Add --incompatible_disable_data_transition for 'cfg = "data"' Skylark calls
PiperOrigin-RevId: 202400312
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/skylark')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkAttr.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkAttr.java b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkAttr.java index 94f893ad8b..0d1a1aa6c8 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkAttr.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkAttr.java @@ -227,6 +227,12 @@ public final class SkylarkAttr implements SkylarkAttrApi { // This used to apply the "disable LIPO" (a.k.a. "data") transition. But now that LIPO is // turned down this is a noop. Still, there are cfg = "data"' references in the depot. So // we have to remove them via b/28688645 before we can remove this path. + if (env.getSemantics().incompatibleDisallowDataTransition()) { + throw new EvalException(ast.getLocation(), + "Using cfg = \"data\" on an attribute is a noop and no longer supported. Please " + + "remove it. You can use --incompatible_disallow_data_transition=false to " + + "temporarily disable this check."); + } } else if (trans.equals("host")) { builder.cfg(HostTransition.INSTANCE); } else if (trans instanceof SplitTransition) { |