aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java
diff options
context:
space:
mode:
authorGravatar Manuel Klimek <klimek@google.com>2015-08-11 18:50:39 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-08-12 15:23:37 +0000
commita381b754c15f4752243b25892363eb522f65a508 (patch)
treebab57e0637f66c2706c43a8d1be5abd0f9eaa904 /src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java
parentdb9968d0ef0d9fce6e74672262097722b507ef2b (diff)
Resolve TODO now that the feature configuration supports conditional expansion
of flag sets. -- MOS_MIGRATED_REVID=100400672
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java
index a2339c2b2a..1ab6a8b5f4 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java
@@ -44,7 +44,6 @@ import com.google.devtools.build.skyframe.SkyFunction;
import java.io.IOException;
import java.util.Collection;
-import java.util.HashSet;
import java.util.zip.ZipException;
/**
@@ -502,29 +501,6 @@ public class FdoSupport {
fdoRootExecPath.getPathString());
}
}
- } else {
- // TODO(bazel-team): Remove this workaround once the feature configuration
- // supports per-file feature enabling.
- // The feature configuration was created based on blaze options, which
- // enabled the fdo optimize options since the fdoRoot was set.
- // In this case the source file doesn't have an associated profile,
- // so we need to disable these features so that we don't add the FDO options.
- // However, the list of features is immutable and set on the CppModel.
- // Create a new feature config here, enabling just what we want,
- // and set it in this builder.
- Collection<String> featureNames = cppConfiguration.getFeatures().getFeatureNames();
- Collection<String> newFeatureNames = new HashSet<>();
- for (String name : featureNames) {
- if (featureConfiguration.isEnabled(name)) {
- newFeatureNames.add(name);
- }
- }
- newFeatureNames.remove(CppRuleClasses.FDO_OPTIMIZE);
- newFeatureNames.remove(CppRuleClasses.AUTOFDO);
- newFeatureNames.remove(CppRuleClasses.LIPO);
- FeatureConfiguration newFeatureConfiguration =
- cppConfiguration.getFeatures().getFeatureConfiguration(newFeatureNames);
- builder.setFeatureConfiguration(newFeatureConfiguration);
}
}
}