diff options
author | 2018-06-11 04:37:56 -0700 | |
---|---|---|
committer | 2018-06-11 04:39:31 -0700 | |
commit | c720152ec1936a537c9519d522d3cb41d19cff77 (patch) | |
tree | 7585196ca419b2763c2f26892ac45dc317ceb6e8 /src/main/java/com/google/devtools/build/lib/rules/python/PythonSemantics.java | |
parent | c7cf6f0d0d9f5ded0e80610df89716bd38cc3631 (diff) |
C++: Refactors PyWrapCc to make it easier to migrate to Skylark
Rolling forward https://github.com/bazelbuild/bazel/commit/6c87715b8ac6b32e636ba307440e2b7362b10a48. When I first tried to roll forward this CL I missed one place where PyCcLinkParamsProvider.TO_LINK_PARAMS should have been called.
The target //production/midas/config:client_config_pb builds fine now.
RELNOTES:none
PiperOrigin-RevId: 200032805
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/python/PythonSemantics.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/python/PythonSemantics.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PythonSemantics.java b/src/main/java/com/google/devtools/build/lib/rules/python/PythonSemantics.java index ee282cbe00..2ca0bc2c53 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PythonSemantics.java +++ b/src/main/java/com/google/devtools/build/lib/rules/python/PythonSemantics.java @@ -17,9 +17,10 @@ import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.analysis.Runfiles; import com.google.devtools.build.lib.analysis.RunfilesSupport; +import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; import com.google.devtools.build.lib.analysis.test.InstrumentedFilesCollector.InstrumentationSpec; 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.CcLinkingInfo; import com.google.devtools.build.lib.vfs.PathFragment; import java.util.Collection; import java.util.List; @@ -36,10 +37,13 @@ public interface PythonSemantics { */ void validate(RuleContext ruleContext, PyCommon common); - /** - * Extends for the default and data runfiles of {@code py_binary} rules with custom elements. - */ - void collectRunfilesForBinary(RuleContext ruleContext, Runfiles.Builder builder, PyCommon common); + /** Extends for the default and data runfiles of {@code py_binary} rules with custom elements. */ + void collectRunfilesForBinary( + RuleContext ruleContext, + Runfiles.Builder builder, + PyCommon common, + CcLinkingInfo ccLinkingInfo) + throws InterruptedException; /** Extends the default runfiles of {@code py_binary} rules with custom elements. */ void collectDefaultRunfilesForBinary(RuleContext ruleContext, Runfiles.Builder builder) @@ -72,7 +76,7 @@ public interface PythonSemantics { Artifact createExecutable( RuleContext ruleContext, PyCommon common, - AbstractCcLinkParamsStore ccLinkParamsStore, + CcLinkingInfo ccLinkingInfo, NestedSet<PathFragment> imports) throws InterruptedException; @@ -82,4 +86,6 @@ public interface PythonSemantics { */ void postInitBinary(RuleContext ruleContext, RunfilesSupport runfilesSupport, PyCommon common) throws InterruptedException; + + CcLinkingInfo buildCcLinkingInfoProvider(Iterable<? extends TransitiveInfoCollection> deps); } |