aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/ConfigurationFragmentValue.java
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2016-03-01 19:26:06 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-03-02 17:54:39 +0000
commit209f52f3000ab927a2ec94b66ec73898f051d4a0 (patch)
tree40379702ee2e2dc0571c57a556c2a6ee97f872ac /src/main/java/com/google/devtools/build/lib/skyframe/ConfigurationFragmentValue.java
parent3f611ab4ee905c09aff05f8fd8f19517be54efa6 (diff)
Always trim the BuildOptions; we've resolved the LIPO issue.
The only input to FdoSupport.prepareToBuild is now the exec root, and changes to that invalidate the entire server anyway. -- MOS_MIGRATED_REVID=116027192
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/ConfigurationFragmentValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/ConfigurationFragmentValue.java18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ConfigurationFragmentValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/ConfigurationFragmentValue.java
index 1f72d00501..9db7f72662 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ConfigurationFragmentValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ConfigurationFragmentValue.java
@@ -51,21 +51,11 @@ public class ConfigurationFragmentValue implements SkyValue {
@ThreadSafe
public static SkyKey key(BuildOptions buildOptions, Class<? extends Fragment> fragmentType,
RuleClassProvider ruleClassProvider) {
- // For dynamic configurations, trim the options down to just those used by this fragment.
- // This ensures we don't end up with different Skyframe keys due to trimming of unrelated
- // options.
- //
- // We don't trim for static configurations because static configurations need to support
- // LIPO and trimming breaks LIPO: it results in CppConfiguration instances being shared
- // across configurations. That isn't safe because CppConfiguration mutates its state
- // in prepareHook() for each configuration.
BuildOptions optionsKey =
- buildOptions.get(BuildConfiguration.Options.class).useDynamicConfigurations
- ? buildOptions.trim(
- BuildConfiguration.getOptionsClasses(
- ImmutableList.<Class<? extends BuildConfiguration.Fragment>>of(fragmentType),
- ruleClassProvider))
- : buildOptions;
+ buildOptions.trim(
+ BuildConfiguration.getOptionsClasses(
+ ImmutableList.<Class<? extends BuildConfiguration.Fragment>>of(fragmentType),
+ ruleClassProvider));
return new SkyKey(SkyFunctions.CONFIGURATION_FRAGMENT,
new ConfigurationFragmentKey(optionsKey, fragmentType));
}