aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2017-12-27 10:11:54 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-27 10:14:01 -0800
commit4af309d4b24f65994481203211c6ea7bec388bed (patch)
treef1a4691b13b8d856a9367f128e767d612a1f98da /src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
parent4b6f10cfff8ab99a17fe5de79966248c3ccf1806 (diff)
ObjectCodecs for all non-test FragmentOption subclasses.
PiperOrigin-RevId: 180202221
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
index 785a54e88c..f41ff41836 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
@@ -50,6 +50,8 @@ import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.events.EventHandler;
import com.google.devtools.build.lib.packages.RuleClassProvider;
import com.google.devtools.build.lib.packages.Target;
+import com.google.devtools.build.lib.skyframe.serialization.ObjectCodec;
+import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
@@ -430,18 +432,21 @@ public class BuildConfiguration implements BuildEvent {
/**
* Options that affect the value of a BuildConfiguration instance.
*
- * <p>(Note: any client that creates a view will also need to declare
- * BuildView.Options, which affect the <i>mechanism</i> of view construction,
- * even if they don't affect the value of the BuildConfiguration instances.)
+ * <p>(Note: any client that creates a view will also need to declare BuildView.Options, which
+ * affect the <i>mechanism</i> of view construction, even if they don't affect the value of the
+ * BuildConfiguration instances.)
*
- * <p>IMPORTANT: when adding new options, be sure to consider whether those
- * values should be propagated to the host configuration or not.
+ * <p>IMPORTANT: when adding new options, be sure to consider whether those values should be
+ * propagated to the host configuration or not.
*
- * <p>ALSO IMPORTANT: all option types MUST define a toString method that
- * gives identical results for semantically identical option values. The
- * simplest way to ensure that is to return the input string.
+ * <p>ALSO IMPORTANT: all option types MUST define a toString method that gives identical results
+ * for semantically identical option values. The simplest way to ensure that is to return the
+ * input string.
*/
+ @AutoCodec(strategy = AutoCodec.Strategy.PUBLIC_FIELDS)
public static class Options extends FragmentOptions implements Cloneable {
+ public static final ObjectCodec<Options> CODEC = new BuildConfiguration_Options_AutoCodec();
+
@Option(
name = "experimental_separate_genfiles_directory",
defaultValue = "true",