Skip to content

Commit 61c7ffa

Browse files
katrecopybara-github
authored andcommitted
Automated rollback of commit 87388e2.
*** 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
1 parent daa8ae5 commit 61c7ffa

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

src/main/java/com/google/devtools/build/lib/analysis/config/BuildOptions.java

-9
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,6 @@ public BuildOptions createHostOptions() {
9595
return builder.addStarlarkOptions(skylarkOptionsMap).build();
9696
}
9797

98-
/** Creates a new BuildOptions instance for exec. */
99-
public BuildOptions createExecOptions() {
100-
Builder builder = builder();
101-
for (FragmentOptions options : fragmentOptionsMap.values()) {
102-
builder.addFragmentOptions(options.getExec());
103-
}
104-
return builder.addStarlarkOptions(skylarkOptionsMap).build();
105-
}
106-
10798
/**
10899
* Returns {@code BuildOptions} that are otherwise identical to this one, but contain only options
109100
* from the given {@link FragmentOptions} classes (plus build configuration options).

src/main/java/com/google/devtools/build/lib/analysis/config/FragmentOptions.java

+1-8
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,11 @@ public FragmentOptions getDefault() {
4747
* Creates a new instance of this {@code FragmentOptions} with all flags adjusted as needed to
4848
* represent the host platform.
4949
*/
50+
@SuppressWarnings("unused")
5051
public FragmentOptions getHost() {
5152
return getDefault();
5253
}
5354

54-
/**
55-
* Creates a new instance of this {@code FragmentOptions} with all flags adjusted as needed to
56-
* represent the execution platform.
57-
*/
58-
public FragmentOptions getExec() {
59-
return clone();
60-
}
61-
6255
/**
6356
* Returns an instance of {@code FragmentOptions} with all flags adjusted to be suitable for
6457
* forming configurations.

0 commit comments

Comments
 (0)