diff options
author | 2018-02-20 02:31:10 -0800 | |
---|---|---|
committer | 2018-02-20 02:32:40 -0800 | |
commit | 993f1de4bfd4b562a0a378badd46b189833f966b (patch) | |
tree | 383bf3ec346ae04284a010ec134766c42eb167b5 /src/test/java/com/google | |
parent | 49f805c028b225ecdfd3c05c1dbb4e09a09b9420 (diff) |
Route fdo logic that deals with the path to the fdo profile through CcToolchainProvider
As --fdo_optimize can point to a label, the path to the fdo profile can not be reliably determined in CppConfiguration.
In order to enable the fdo features (which depend on the path to the fdo profile), the logic from CppConfiguration.configurationEnabledFeatures() has been moved to CcCommon.configureFeatures(). The latter method has access to the fdo profile path through CcToolchainProvider.
RELNOTES: None.
PiperOrigin-RevId: 186278311
Diffstat (limited to 'src/test/java/com/google')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProviderTest.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProviderTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProviderTest.java index 85b0c3d610..a6b67737c7 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProviderTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProviderTest.java @@ -21,6 +21,7 @@ import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.collect.nestedset.Order; import com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures.Variables; +import com.google.devtools.build.lib.rules.cpp.FdoSupport.FdoMode; import com.google.devtools.build.lib.util.Pair; import com.google.devtools.build.lib.vfs.PathFragment; import org.junit.Test; @@ -64,7 +65,8 @@ public class CcToolchainProviderTest { null, ImmutableMap.<String, String>of(), ImmutableList.<PathFragment>of(), - null); + null, + FdoMode.OFF); CcToolchainProvider b = new CcToolchainProvider( @@ -96,7 +98,8 @@ public class CcToolchainProviderTest { null, ImmutableMap.<String, String>of(), ImmutableList.<PathFragment>of(), - null); + null, + FdoMode.OFF); new EqualsTester() .addEqualityGroup(a) |