Skip to content

Commit

Permalink
Use output directory naming scheme diff_against_dynamic_baseline
Browse files Browse the repository at this point in the history
Compared to `diff_against_baseline`, this mode improves caching when top-level flags change that are reset in the exec configuration.

Fixes #18480

Closes #18561.

PiperOrigin-RevId: 560239452
Change-Id: I0bf70b96c26c00a922ae9879ba1e6041678fcb05
  • Loading branch information
fmeum authored and copybara-github committed Aug 26, 2023
1 parent 669c8aa commit 81d12db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ public OutputDirectoryNamingSchemeConverter() {

@Option(
name = "experimental_output_directory_naming_scheme",
defaultValue = "diff_against_baseline",
defaultValue = "diff_against_dynamic_baseline",
converter = OutputDirectoryNamingSchemeConverter.class,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.AFFECTS_OUTPUTS},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import com.google.devtools.build.lib.analysis.config.BuildOptionsView;
import com.google.devtools.build.lib.analysis.config.CompilationMode;
import com.google.devtools.build.lib.analysis.config.CoreOptions;
import com.google.devtools.build.lib.analysis.config.CoreOptions.OutputDirectoryNamingScheme;
import com.google.devtools.build.lib.analysis.config.InvalidConfigurationException;
import com.google.devtools.build.lib.analysis.config.transitions.SplitTransition;
import com.google.devtools.build.lib.analysis.util.BuildViewTestCase;
Expand Down Expand Up @@ -146,8 +145,10 @@ private String configurationDir(
String modeSegment = compilationModeFlag(compilationMode);

String hash = "";
if (targetConfig.getOptions().get(CoreOptions.class).outputDirectoryNamingScheme
== OutputDirectoryNamingScheme.DIFF_AGAINST_BASELINE) {
if (targetConfig
.getOptions()
.get(CoreOptions.class)
.useBaselineForOutputDirectoryNamingScheme()) {
PlatformType platformType = null;
switch (configurationDistinguisher) {
case APPLEBIN_IOS:
Expand Down

0 comments on commit 81d12db

Please sign in to comment.