diff options
author | plf <plf@google.com> | 2018-05-15 06:04:34 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-05-15 06:06:16 -0700 |
commit | 6b3e482e010f5e256f43013f661ed9f67a723784 (patch) | |
tree | 8605c7d61416789c96743c7da318ca68a7fd86dc /src/main/java/com/google/devtools/build/lib/rules/python/PyBinary.java | |
parent | c4f2d80270f1ce947fcf7fb0a4e5f0afb3a7062d (diff) |
C++: Deletes CcLinkParamsInfo
This class is not necessary anymore. We can use CcLinkParamsStoreImpl directly
which has been renamed to CcLinkParamsStore.
RELNOTES:none
PiperOrigin-RevId: 196656488
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/python/PyBinary.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/python/PyBinary.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PyBinary.java b/src/main/java/com/google/devtools/build/lib/rules/python/PyBinary.java index 21b38c255a..41e19c497c 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PyBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/python/PyBinary.java @@ -24,9 +24,9 @@ import com.google.devtools.build.lib.analysis.RunfilesProvider; import com.google.devtools.build.lib.analysis.RunfilesSupport; import com.google.devtools.build.lib.analysis.configuredtargets.RuleConfiguredTarget.Mode; import com.google.devtools.build.lib.collect.nestedset.NestedSet; +import com.google.devtools.build.lib.rules.cpp.AbstractCcLinkParamsStore; import com.google.devtools.build.lib.rules.cpp.CcCommon.CcFlagsSupplier; import com.google.devtools.build.lib.rules.cpp.CcLinkParams; -import com.google.devtools.build.lib.rules.cpp.CcLinkParamsInfo; import com.google.devtools.build.lib.rules.cpp.CcLinkParamsStore; import com.google.devtools.build.lib.rules.cpp.CcLinkingInfo; import com.google.devtools.build.lib.syntax.Type; @@ -60,7 +60,7 @@ public abstract class PyBinary implements RuleConfiguredTargetFactory { static RuleConfiguredTargetBuilder init(RuleContext ruleContext, PythonSemantics semantics, PyCommon common) throws InterruptedException { ruleContext.initConfigurationMakeVariableContext(new CcFlagsSupplier(ruleContext)); - CcLinkParamsStore ccLinkParamsStore = initializeCcLinkParamStore(ruleContext); + AbstractCcLinkParamsStore ccLinkParamsStore = initializeCcLinkParamStore(ruleContext); List<Artifact> srcs = common.validateSrcs(); List<Artifact> allOutputs = @@ -125,7 +125,7 @@ public abstract class PyBinary implements RuleConfiguredTargetFactory { semantics.postInitBinary(ruleContext, runfilesSupport, common); CcLinkingInfo.Builder ccLinkingInfoBuilder = CcLinkingInfo.Builder.create(); - ccLinkingInfoBuilder.setCcLinkParamsInfo(new CcLinkParamsInfo(ccLinkParamsStore)); + ccLinkingInfoBuilder.setCcLinkParamsStore(new CcLinkParamsStore(ccLinkParamsStore)); return builder .setFilesToBuild(common.getFilesToBuild()) @@ -156,14 +156,16 @@ public abstract class PyBinary implements RuleConfiguredTargetFactory { return builder.build(); } - private static CcLinkParamsStore initializeCcLinkParamStore(final RuleContext ruleContext) { - return new CcLinkParamsStore() { + private static AbstractCcLinkParamsStore initializeCcLinkParamStore( + final RuleContext ruleContext) { + return new AbstractCcLinkParamsStore() { @Override - protected void collect(CcLinkParams.Builder builder, boolean linkingStatically, - boolean linkShared) { - builder.addTransitiveTargets(ruleContext.getPrerequisites("deps", Mode.TARGET), + protected void collect( + CcLinkParams.Builder builder, boolean linkingStatically, boolean linkShared) { + builder.addTransitiveTargets( + ruleContext.getPrerequisites("deps", Mode.TARGET), PyCcLinkParamsProvider.TO_LINK_PARAMS, - CcLinkParamsInfo.TO_LINK_PARAMS); + CcLinkParamsStore.TO_LINK_PARAMS); } }; } |