aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules
diff options
context:
space:
mode:
authorGravatar gregce <gregce@google.com>2017-04-18 22:40:08 +0200
committerGravatar Klaus Aehlig <aehlig@google.com>2017-04-19 10:48:02 +0200
commitff29c0b39cf936a2699b05edd54f483f1a037d93 (patch)
treee6ef169d5a18925e8d0b99f6846f7dcc65d70b42 /src/main/java/com/google/devtools/build/lib/rules
parentb462128f3d39d065e0871b98d076ab9fb186e724 (diff)
Change Bazel's LIPO model to support dynamic configurations.
The key change is to eliminate the need to transition from the data to the target configuration by relying on out-of-band configuration state. Specifically, the old model drops LIPO options from the data configuration. In the cases when we have to switch back (i.e. TARGET_CONFIG_FOR_LIPO), those options have to get re-injected somehow. Static configurations achieve this with the global configuration transitions table. But dynamic configs have no comparable source (and they consciously eschew global state). This cl changes the model to *keep* LIPO settings in the data config, then use a new "enableOrDisable" flag to determine whether or not to actually use them. With this model, the data -> target transition is now as simple as toggling that flag. This change doesn't actually add dynamic config LIPO support. It's doing enough as it is, and we need to make sure it doesn't break existing LIPO semantics. Dynamic support will come as a followup. PiperOrigin-RevId: 153504240
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java70
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java8
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java211
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/transitions/LipoDataTransition.java12
4 files changed, 242 insertions, 59 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
index 4d3decbd48..95efb13dd9 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
@@ -16,6 +16,7 @@ package com.google.devtools.build.lib.rules.cpp;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Predicate;
+import com.google.common.base.Verify;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
@@ -445,9 +446,7 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
this.stlLabel = params.stlLabel;
this.compilationMode = params.commonOptions.compilationMode;
this.useLLVMCoverageMap = params.commonOptions.useLLVMCoverageMapFormat;
- this.lipoContextCollector = cppOptions.lipoCollector;
-
-
+ this.lipoContextCollector = cppOptions.isLipoContextCollector();
this.crosstoolTopPathFragment = crosstoolTop.getPackageIdentifier().getPathUnderExecRoot();
try {
@@ -467,7 +466,7 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
throw new AssertionError(e);
}
- if (cppOptions.lipoMode == LipoMode.BINARY) {
+ if (cppOptions.getLipoMode() == LipoMode.BINARY) {
// TODO(bazel-team): implement dynamic linking with LIPO
this.dynamicMode = DynamicMode.OFF;
} else {
@@ -1685,7 +1684,7 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
* AutoFDO mode.
*/
public boolean getAutoFdoLipoData() {
- return cppOptions.autoFdoLipoData;
+ return cppOptions.getAutoFdoLipoData();
}
/**
@@ -1700,18 +1699,31 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
* Returns the currently active LIPO compilation mode.
*/
public LipoMode getLipoMode() {
- return cppOptions.lipoMode;
+ return cppOptions.getLipoMode();
}
public boolean isFdo() {
return cppOptions.isFdo();
}
+ /**
+ * Returns true if LIPO optimization should be applied for this configuration.
+ */
public boolean isLipoOptimization() {
// The LIPO optimization bits are set in the LIPO context collector configuration, too.
return cppOptions.isLipoOptimization();
}
+ /**
+ * Returns true if this is a data configuration for a LIPO-optimizing build.
+ *
+ * <p>This means LIPO is not applied for this configuration, but LIPO might be reenabled further
+ * down the dependency tree.
+ */
+ public boolean isDataConfigurationForLipoOptimization() {
+ return cppOptions.isDataConfigurationForLipoOptimization();
+ }
+
public boolean isLipoOptimizationOrInstrumentation() {
return cppOptions.isLipoOptimizationOrInstrumentation();
}
@@ -1720,8 +1732,8 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
* Returns true if it is AutoFDO LIPO build.
*/
public boolean isAutoFdoLipo() {
- return cppOptions.fdoOptimize != null
- && CppFileTypes.GCC_AUTO_PROFILE.matches(cppOptions.fdoOptimize)
+ return cppOptions.getFdoOptimize() != null
+ && CppFileTypes.GCC_AUTO_PROFILE.matches(cppOptions.getFdoOptimize())
&& getLipoMode() != LipoMode.OFF;
}
@@ -1755,8 +1767,29 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
return ImmutableList.copyOf(cppOptions.perFileCopts);
}
+ /**
+ * Returns the LIPO context for this configuration.
+ *
+ * <p>This only exists for configurations that apply LIPO in LIPO-optimized builds. It does
+ * <b>not</b> exist for data configurations, which contain LIPO state but don't actually apply
+ * LIPO. Nor does it exist for host configurations, which contain no LIPO state.
+ */
public Label getLipoContextLabel() {
- return cppOptions.getLipoContextLabel();
+ return cppOptions.getLipoContext();
+ }
+
+ /**
+ * Returns the LIPO context for this build, even if LIPO isn't enabled in the current
+ * configuration.
+ *
+ * <p>Unlike {@link #getLipoContextLabel}, this returns the LIPO context for the data
+ * configuration.
+ *
+ * <p>Unless you have a clear reason to use this version (which basically involves
+ * inspecting oher configurations' state), always use {@link #getLipoContextLabel}.
+ */
+ public Label getLipoContextForBuild() {
+ return cppOptions.getLipoContextForBuild();
}
/**
@@ -2038,23 +2071,23 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
}
}
- if (cppOptions.fdoInstrument != null && cppOptions.fdoOptimize != null) {
+ if (cppOptions.getFdoInstrument() != null && cppOptions.getFdoOptimize() != null) {
reporter.handle(Event.error("Cannot instrument and optimize for FDO at the same time. "
+ "Remove one of the '--fdo_instrument' and '--fdo_optimize' options"));
}
- if (cppOptions.lipoContext != null) {
- if (cppOptions.lipoMode != LipoMode.BINARY || cppOptions.fdoOptimize == null) {
+ if (cppOptions.lipoContextForBuild != null) {
+ if (cppOptions.getLipoMode() != LipoMode.BINARY || cppOptions.getFdoOptimize() == null) {
reporter.handle(Event.warn("The --lipo_context option can only be used together with "
+ "--fdo_optimize=<profile zip> and --lipo=binary. LIPO context will be ignored."));
}
} else {
- if (cppOptions.lipoMode == LipoMode.BINARY && cppOptions.fdoOptimize != null) {
+ if (cppOptions.getLipoMode() == LipoMode.BINARY && cppOptions.getFdoOptimize() != null) {
reporter.handle(Event.error("The --lipo_context option must be specified when using "
+ "--fdo_optimize=<profile zip> and --lipo=binary"));
}
}
- if (cppOptions.lipoMode == LipoMode.BINARY && compilationMode != CompilationMode.OPT) {
+ if (cppOptions.getLipoMode() == LipoMode.BINARY && compilationMode != CompilationMode.OPT) {
reporter.handle(Event.error(
"'--lipo=binary' can only be used with '--compilation_mode=opt' (or '-c opt')"));
}
@@ -2070,6 +2103,11 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
+ "generate a dwp for the test executable, use '--fission=yes' with a toolchain "
+ "that supports Fission and build statically."));
}
+
+ // This is an assertion check vs. user error because users can't trigger this state.
+ Verify.verify(
+ !(buildOptions.get(BuildConfiguration.Options.class).isHost && cppOptions.isFdo()),
+ "FDO/LIPO state should not propagate to the host configuration");
}
@Override
@@ -2156,7 +2194,7 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
}
public PathFragment getFdoInstrument() {
- return cppOptions.fdoInstrument;
+ return cppOptions.getFdoInstrument();
}
public Path getFdoZip() {
@@ -2170,7 +2208,7 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
@Override
public ImmutableSet<String> configurationEnabledFeatures(RuleContext ruleContext) {
ImmutableSet.Builder<String> requestedFeatures = ImmutableSet.builder();
- if (cppOptions.fdoInstrument != null) {
+ if (cppOptions.getFdoInstrument() != null) {
requestedFeatures.add(CppRuleClasses.FDO_INSTRUMENT);
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java
index c6e4a81586..4026cca830 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java
@@ -153,11 +153,11 @@ public class CppConfigurationLoader implements ConfigurationFragmentFactory {
// FDO
// TODO(bazel-team): move this to CppConfiguration.prepareHook
Path fdoZip;
- if (cppOptions.fdoOptimize == null) {
+ if (cppOptions.getFdoOptimize() == null) {
fdoZip = null;
- } else if (cppOptions.fdoOptimize.startsWith("//")) {
+ } else if (cppOptions.getFdoOptimize().startsWith("//")) {
try {
- Target target = env.getTarget(Label.parseAbsolute(cppOptions.fdoOptimize));
+ Target target = env.getTarget(Label.parseAbsolute(cppOptions.getFdoOptimize()));
if (target == null) {
return null;
}
@@ -175,7 +175,7 @@ public class CppConfigurationLoader implements ConfigurationFragmentFactory {
throw new InvalidConfigurationException(e);
}
} else {
- fdoZip = directories.getWorkspace().getRelative(cppOptions.fdoOptimize);
+ fdoZip = directories.getWorkspace().getRelative(cppOptions.getFdoOptimize());
try {
// We don't check for file existence, but at least the filename should be well-formed.
FileSystemUtils.checkBaseName(fdoZip.getBaseName());
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
index baa5bfe613..1cd49e800c 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
@@ -33,12 +33,12 @@ import com.google.devtools.build.lib.view.config.crosstool.CrosstoolConfig.LipoM
import com.google.devtools.common.options.Converter;
import com.google.devtools.common.options.EnumConverter;
import com.google.devtools.common.options.Option;
-import com.google.devtools.common.options.OptionsParser.OptionUsageRestrictions;
import com.google.devtools.common.options.OptionsParsingException;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import javax.annotation.Nullable;
/**
* Command-line options for C++.
@@ -128,14 +128,6 @@ public class CppOptions extends FragmentOptions {
}
@Option(
- name = "lipo input collector",
- defaultValue = "false",
- optionUsageRestrictions = OptionUsageRestrictions.INTERNAL,
- help = "Internal flag, only used to create configurations with the LIPO-collector flag set."
- )
- public boolean lipoCollector;
-
- @Option(
name = "crosstool_top",
defaultValue = "@bazel_tools//tools/cpp:toolchain",
category = "version",
@@ -380,7 +372,20 @@ public class CppOptions extends FragmentOptions {
+ "With Clang/LLVM compiler, it also accepts the directory name under"
+ "which the raw profile file(s) will be dumped at runtime."
)
- public PathFragment fdoInstrument;
+ /**
+ * Never read FDO/LIPO options directly. This is because {@link #lipoConfigurationState}
+ * determines whether these options are actually "active" for this configuration. Instead, use
+ * the equivalent getter method, which takes that into account.
+ */
+ public PathFragment fdoInstrumentForBuild;
+
+ /**
+ * Returns the --fdo_instrument value if FDO is specified and active for this configuration,
+ * the default value otherwise.
+ */
+ public PathFragment getFdoInstrument() {
+ return enableLipoSettings() ? fdoInstrumentForBuild : null;
+ }
@Option(
name = "fdo_optimize",
@@ -394,7 +399,20 @@ public class CppOptions extends FragmentOptions {
+ "need to add an exports_files directive to the corresponding package to make "
+ "the file visible to Blaze. It also accepts an indexed LLVM profile file."
)
- public String fdoOptimize;
+ /**
+ * Never read FDO/LIPO options directly. This is because {@link #lipoConfigurationState}
+ * determines whether these options are actually "active" for this configuration. Instead, use
+ * the equivalent getter method, which takes that into account.
+ */
+ public String fdoOptimizeForBuild;
+
+ /**
+ * Returns the --fdo_optimize value if FDO is specified and active for this configuration,
+ * the default value otherwise.
+ */
+ public String getFdoOptimize() {
+ return enableLipoSettings() ? fdoOptimizeForBuild : null;
+ }
@Option(
name = "autofdo_lipo_data",
@@ -404,8 +422,23 @@ public class CppOptions extends FragmentOptions {
"If true then the directory name for non-LIPO targets will have a "
+ "'-lipodata' suffix in AutoFDO mode."
)
- public boolean autoFdoLipoData;
+ /**
+ * Never read FDO/LIPO options directly. This is because {@link #lipoConfigurationState}
+ * determines whether these options are actually "active" for this configuration. Instead, use
+ * the equivalent getter method, which takes that into account.
+ */
+ public boolean autoFdoLipoDataForBuild;
+ /**
+ * Returns the --autofdo_lipo_data value for this configuration. This is false except for data
+ * configurations under LIPO builds.
+ */
+ public boolean getAutoFdoLipoData() {
+ return enableLipoSettings()
+ ? autoFdoLipoDataForBuild
+ : lipoModeForBuild != LipoMode.OFF && fdoOptimizeForBuild != null && FdoSupport.isAutoFdo(
+ fdoOptimizeForBuild);
+ }
@Option(
name = "lipo",
defaultValue = "off",
@@ -417,7 +450,20 @@ public class CppOptions extends FragmentOptions {
+ "only has an effect when FDO is also enabled. Currently LIPO is only supported "
+ "when building a single cc_binary rule."
)
- public LipoMode lipoMode;
+ /**
+ * Never read FDO/LIPO options directly. This is because {@link #lipoConfigurationState}
+ * determines whether these options are actually "active" for this configuration. Instead, use
+ * the equivalent getter method, which takes that into account.
+ */
+ public LipoMode lipoModeForBuild;
+
+ /**
+ * Returns the --lipo value if LIPO is specified and active for this configuration,
+ * the default value otherwise.
+ */
+ public LipoMode getLipoMode() {
+ return enableLipoSettings() ? lipoModeForBuild : LipoMode.OFF;
+ }
@Option(
name = "lipo_context",
@@ -427,7 +473,82 @@ public class CppOptions extends FragmentOptions {
implicitRequirements = {"--linkopt=-Wl,--warn-unresolved-symbols"},
help = "Specifies the binary from which the LIPO profile information comes."
)
- public Label lipoContext;
+ /**
+ * Never read FDO/LIPO options directly. This is because {@link #lipoConfigurationState}
+ * determines whether these options are actually "active" for this configuration. Instead, use
+ * the equivalent getter method, which takes that into account.
+ */
+ public Label lipoContextForBuild;
+
+ /**
+ * Returns the --lipo_context value if LIPO is specified and active for this configuration,
+ * null otherwise.
+ */
+ @Nullable
+ public Label getLipoContext() {
+ return isLipoOptimization() ? lipoContextForBuild : null;
+ }
+
+ /**
+ * Returns the LIPO context for this build, even if LIPO isn't enabled in the current
+ * configuration.
+ */
+ public Label getLipoContextForBuild() {
+ return lipoContextForBuild;
+ }
+
+ /**
+ * Internal state determining how to apply LIPO settings under this configuration.
+ */
+ public enum LipoConfigurationState {
+ /** Don't LIPO-optimize targets under this configuration. */
+ IGNORE_LIPO,
+ /** LIPO-optimize targets under this configuration if this is a LIPO build. */
+ APPLY_LIPO,
+ /**
+ * Evaluate targets in this configuration in "LIPO context collector" mode. See
+ * {@link FdoSupport} for details.
+ */
+ LIPO_CONTEXT_COLLECTOR,
+ }
+
+ /**
+ * Converter for {@link LipoConfigurationState}.
+ */
+ public static class LipoConfigurationStateConverter
+ extends EnumConverter<LipoConfigurationState> {
+ public LipoConfigurationStateConverter() {
+ super(LipoConfigurationState.class, "LIPO configuration state");
+ }
+ }
+
+ @Option(
+ name = "lipo configuration state",
+ defaultValue = "apply_lipo",
+ category = "internal",
+ converter = LipoConfigurationStateConverter.class
+ )
+ public LipoConfigurationState lipoConfigurationState;
+
+ /**
+ * Returns true if targets under this configuration should use the build's LIPO settings.
+ *
+ * <p>Even when we switch off LIPO (e.g. by switching to a data configuration), we still need to
+ * remember the LIPO settings in case we need to switch back (e.g. if we build a genrule with a
+ * data dependency on the LIPO context).
+ *
+ * <p>We achieve this by maintaining a "configuration state" flag that flips on / off when we
+ * want to enable / disable LIPO respectively. This means we need to be careful to distinguish
+ * between the existence of LIPO settings and LIPO actually applying to the configuration. So when
+ * buiding a target, it's not enough to see if {@link #lipoContextForBuild} or
+ * {@link #lipoModeForBuild} are set. We also need to check this flag.
+ *
+ * <p>This class exposes appropriate convenience methods to make these checks convenient and easy.
+ * Use them and read the documentation carefully.
+ */
+ private boolean enableLipoSettings() {
+ return lipoConfigurationState != LipoConfigurationState.IGNORE_LIPO;
+ }
@Option(
name = "experimental_stl",
@@ -636,8 +757,8 @@ public class CppOptions extends FragmentOptions {
host.useStartEndLib = useStartEndLib;
host.stripBinaries = StripMode.ALWAYS;
- host.fdoOptimize = null;
- host.lipoMode = LipoMode.OFF;
+ host.fdoOptimizeForBuild = null;
+ host.lipoModeForBuild = LipoMode.OFF;
host.inmemoryDotdFiles = inmemoryDotdFiles;
return host;
@@ -662,7 +783,7 @@ public class CppOptions extends FragmentOptions {
labelMap.put("crosstool", libcLabel);
}
}
- addOptionalLabel(labelMap, "fdo", fdoOptimize);
+ addOptionalLabel(labelMap, "fdo", getFdoOptimize());
if (stl != null) {
labelMap.put("STL", stl);
@@ -672,8 +793,8 @@ public class CppOptions extends FragmentOptions {
labelMap.put("custom_malloc", customMalloc);
}
- if (getLipoContextLabel() != null) {
- labelMap.put("lipo", getLipoContextLabel());
+ if (getLipoContext() != null) {
+ labelMap.put("lipo", getLipoContext());
}
}
@@ -695,29 +816,53 @@ public class CppOptions extends FragmentOptions {
return ImmutableMap.of("CROSSTOOL", crosstoolLabels, "COVERAGE", ImmutableSet.<Label>of());
}
+ /**
+ * Returns true if targets under this configuration should apply FDO.
+ */
public boolean isFdo() {
- return fdoOptimize != null || fdoInstrument != null;
+ return getFdoOptimize() != null || getFdoInstrument() != null;
}
+ /**
+ * Returns true if this configuration has LIPO optimization settings (even if they're
+ * not necessarily active).
+ */
+ private boolean hasLipoOptimizationState() {
+ return lipoModeForBuild == LipoMode.BINARY && fdoOptimizeForBuild != null
+ && lipoContextForBuild != null;
+ }
+
+ /**
+ * Returns true if targets under this configuration should LIPO-optimize.
+ */
public boolean isLipoOptimization() {
- return lipoMode == LipoMode.BINARY
- && fdoOptimize != null
- && lipoContext != null
- && !lipoCollector;
+ return hasLipoOptimizationState() && enableLipoSettings() && !isLipoContextCollector();
}
- public boolean isLipoOptimizationOrInstrumentation() {
- return lipoMode == LipoMode.BINARY
- && ((fdoOptimize != null && lipoContext != null) || fdoInstrument != null)
- && !lipoCollector;
+ /**
+ * Returns true if this is a data configuration for a LIPO-optimizing build.
+ *
+ * <p>This means LIPO is not applied for this configuration, but LIPO might be reenabled further
+ * down the dependency tree.
+ */
+ public boolean isDataConfigurationForLipoOptimization() {
+ return hasLipoOptimizationState() && !enableLipoSettings();
}
- public Label getLipoContextLabel() {
- return (lipoMode == LipoMode.BINARY && fdoOptimize != null) ? lipoContext : null;
+ /**
+ * Returns true if targets under this configuration should LIPO-optimize or LIPO-instrument.
+ */
+ public boolean isLipoOptimizationOrInstrumentation() {
+ return getLipoMode() == LipoMode.BINARY
+ && ((getFdoOptimize() != null && getLipoContext() != null) || getFdoInstrument() != null)
+ && !isLipoContextCollector();
}
- public LipoMode getLipoMode() {
- return lipoMode;
+ /**
+ * Returns true if this is the LIPO context collector configuration.
+ */
+ public boolean isLipoContextCollector() {
+ return lipoConfigurationState == LipoConfigurationState.LIPO_CONTEXT_COLLECTOR;
}
/**
@@ -726,7 +871,7 @@ public class CppOptions extends FragmentOptions {
@Override
public boolean useStaticConfigurationsOverride() {
// --lipo=binary is technically possible without FDO, even though it doesn't do anything.
- return isFdo() || getLipoMode() == LipoMode.BINARY;
+ return isFdo() || lipoModeForBuild == LipoMode.BINARY;
}
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/transitions/LipoDataTransition.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/transitions/LipoDataTransition.java
index 3556eecb24..d9b9ae06dc 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/transitions/LipoDataTransition.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/transitions/LipoDataTransition.java
@@ -44,7 +44,7 @@ public final class LipoDataTransition implements PatchTransition {
}
CppOptions cppOptions = options.get(CppOptions.class);
- if (cppOptions.lipoMode == CrosstoolConfig.LipoMode.OFF) {
+ if (cppOptions.getLipoMode() == CrosstoolConfig.LipoMode.OFF) {
return options;
}
@@ -52,12 +52,12 @@ public final class LipoDataTransition implements PatchTransition {
cppOptions = options.get(CppOptions.class);
// Once autoFdoLipoData is on, it stays on (through all future transitions).
- if (!cppOptions.autoFdoLipoData && cppOptions.fdoOptimize != null) {
- cppOptions.autoFdoLipoData = FdoSupport.isAutoFdo(cppOptions.fdoOptimize);
+ if (!cppOptions.getAutoFdoLipoData() && cppOptions.getFdoOptimize() != null) {
+ cppOptions.autoFdoLipoDataForBuild = FdoSupport.isAutoFdo(cppOptions.getFdoOptimize());
}
- cppOptions.lipoMode = CrosstoolConfig.LipoMode.OFF;
- cppOptions.fdoInstrument = null;
- cppOptions.fdoOptimize = null;
+ cppOptions.lipoModeForBuild = CrosstoolConfig.LipoMode.OFF;
+ cppOptions.fdoInstrumentForBuild = null;
+ cppOptions.fdoOptimizeForBuild = null;
return options;
}