aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2015-12-11 11:17:49 +0000
committerGravatar David Chen <dzc@google.com>2015-12-11 17:08:37 +0000
commit6089e5be0d8f84ea3c96b5f46bf2387491fe7178 (patch)
treea9353f0e6e040aecb33d37cf9d8f1d47128d4eb5 /src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java
parentcb8f278f42f3c8c7c69314c8cf68175718298216 (diff)
Clean up the configuration-related code paths a bit.
- If we have a class object available, we can use .cast(Object) - Only store the required options objects in CppConfigurationParameters rather than keeping the entire BuildOptions -- MOS_MIGRATED_REVID=109981236
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java6
1 files changed, 4 insertions, 2 deletions
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 a68b800bd4..2b200f9ef4 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
@@ -88,7 +88,8 @@ public class CppConfigurationLoader implements ConfigurationFragmentFactory {
public static class CppConfigurationParameters {
protected final CrosstoolConfig.CToolchain toolchain;
protected final String cacheKeySuffix;
- protected final BuildOptions buildOptions;
+ protected final BuildConfiguration.Options commonOptions;
+ protected final CppOptions cppOptions;
protected final Label crosstoolTop;
protected final Label ccToolchainLabel;
protected final Path fdoZip;
@@ -103,7 +104,8 @@ public class CppConfigurationLoader implements ConfigurationFragmentFactory {
Label ccToolchainLabel) {
this.toolchain = toolchain;
this.cacheKeySuffix = cacheKeySuffix;
- this.buildOptions = buildOptions;
+ this.commonOptions = buildOptions.get(BuildConfiguration.Options.class);
+ this.cppOptions = buildOptions.get(CppOptions.class);
this.fdoZip = fdoZip;
this.execRoot = execRoot;
this.crosstoolTop = crosstoolTop;