Skip to content

Commit

Permalink
Automated rollback of commit 87388e2.
Browse files Browse the repository at this point in the history
*** 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
  • Loading branch information
katre authored and copybara-github committed May 6, 2019
1 parent daa8ae5 commit 61c7ffa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 61c7ffa

Please sign in to comment.