Intern execution info maps produced by --modify_execution_info.
@@ -110,6 +110,9 @@ public class BuildConfiguration implements BuildConfigurationApi {
private static final Interner<ImmutableSortedMap<Class<? extends Fragment>, Fragment>>
fragmentsInterner = BlazeInterners.newWeakInterner();
+ private static final Interner<ImmutableMap<String, String>>
+ executionInfoInterner = BlazeInterners.newWeakInterner();
+
/** Compute the default shell environment for actions from the command line options. */
public interface ActionEnvironmentProvider {
ActionEnvironment getActionEnvironment(BuildOptions options);
@@ -1883,7 +1886,7 @@ public class BuildConfiguration implements BuildConfigurationApi {
}
LinkedHashMap<String, String> mutableCopy = new LinkedHashMap<>(executionInfo);
modifyExecutionInfo(mutableCopy, mnemonic);
- return ImmutableMap.copyOf(mutableCopy);
+ return executionInfoInterner.intern(ImmutableMap.copyOf(mutableCopy));
}
/** Applies {@code executionInfoModifiers} to the given {@code executionInfo}. */
