From 61c7ffa60ae9c1937dd6d8ee30a8c0471094ee71 Mon Sep 17 00:00:00 2001 From: jcater Date: Mon, 6 May 2019 01:58:31 -0700 Subject: [PATCH] Automated rollback of commit 87388e24814b177f54ca7697b4233489f90c587e. *** Reason for rollback *** Removing this because it's less surprising for rule authors if execution configurations start from default flags. *** Original change description *** Add getExec method to FragmentOptions. This acts similarly to getHost, except: 1. It is intended to generate options for the exec transition, and 2. The default is to clone the options, not start with defaults. Part of work on execution transitions, #7935. PiperOrigin-RevId: 246788700 --- .../devtools/build/lib/analysis/config/BuildOptions.java | 9 --------- .../build/lib/analysis/config/FragmentOptions.java | 9 +-------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildOptions.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildOptions.java index ac029ebf16960f..c2c7f06e634401 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildOptions.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildOptions.java @@ -95,15 +95,6 @@ public BuildOptions createHostOptions() { return builder.addStarlarkOptions(skylarkOptionsMap).build(); } - /** Creates a new BuildOptions instance for exec. */ - public BuildOptions createExecOptions() { - Builder builder = builder(); - for (FragmentOptions options : fragmentOptionsMap.values()) { - builder.addFragmentOptions(options.getExec()); - } - return builder.addStarlarkOptions(skylarkOptionsMap).build(); - } - /** * Returns {@code BuildOptions} that are otherwise identical to this one, but contain only options * from the given {@link FragmentOptions} classes (plus build configuration options). diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/FragmentOptions.java b/src/main/java/com/google/devtools/build/lib/analysis/config/FragmentOptions.java index 815effca9e7032..2ff277d31f044e 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/config/FragmentOptions.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/config/FragmentOptions.java @@ -47,18 +47,11 @@ public FragmentOptions getDefault() { * Creates a new instance of this {@code FragmentOptions} with all flags adjusted as needed to * represent the host platform. */ + @SuppressWarnings("unused") public FragmentOptions getHost() { return getDefault(); } - /** - * Creates a new instance of this {@code FragmentOptions} with all flags adjusted as needed to - * represent the execution platform. - */ - public FragmentOptions getExec() { - return clone(); - } - /** * Returns an instance of {@code FragmentOptions} with all flags adjusted to be suitable for * forming configurations.