aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/config/transitions/ConfigurationTransition.java
diff options
context:
space:
mode:
authorGravatar gregce <gregce@google.com>2017-12-21 14:31:24 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-21 14:33:45 -0800
commit9ccafc68eff8485f7abedf35e6130d564f5c118e (patch)
treeb5bf1d17225e72e9dd10f1475fef7e28be39f925 /src/main/java/com/google/devtools/build/lib/analysis/config/transitions/ConfigurationTransition.java
parent0421d7d8566a6fbe35e17a1edc3ab4d622aa6c9e (diff)
Move config transition definitions out of lib.packages.Attribute.
This cleans up a legacy API from Bazel's "static configuration" days, when transition definitions involved deep and complex logic in the analysis code. That was too much cruft to embed into lib.packages. But the modern definitions are way simpler and thus easier to embed. This change only *copies* the existing definitions. Because a lot of references will have to be updated, we'll migrate the move over a few changes. PiperOrigin-RevId: 179859293
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/config/transitions/ConfigurationTransition.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/config/transitions/ConfigurationTransition.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/transitions/ConfigurationTransition.java b/src/main/java/com/google/devtools/build/lib/analysis/config/transitions/ConfigurationTransition.java
new file mode 100644
index 0000000000..6cee8d4509
--- /dev/null
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/transitions/ConfigurationTransition.java
@@ -0,0 +1,43 @@
+// Copyright 2017 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.devtools.build.lib.analysis.config.transitions;
+
+/**
+ * Declaration how the configuration should change when following a label or label list attribute.
+ *
+ * <p>Do not add to this. This is a legacy interface from when Blaze had limited support for
+ * transitions. Use {@link PatchTransition} or {@link SplitTransition} instead.
+ */
+@Deprecated
+public enum ConfigurationTransition implements Transition {
+ /** No transition, i.e., the same configuration as the current. */
+ NONE,
+
+ /** Transition to a null configuration (applies to, e.g., input files). */
+ NULL,
+
+ /** Transition from the target configuration to the data configuration. */
+ // TODO(bazel-team): Move this elsewhere.
+ DATA,
+
+ /**
+ * Transition to one or more configurations. To obtain the actual child configurations,
+ * invoke {@link com.google.devtools.build.lib.packages.Attribute#getSplitTransition}).
+ * com.google.devtools.build.lib.packages.AttributeMap)}.
+ *
+ * <p>See {@link SplitTransition}.
+ **/
+ SPLIT
+}