From d0982b905d93e219a0caccdcf5d6ae1e219387c2 Mon Sep 17 00:00:00 2001 From: plf Date: Thu, 7 Jun 2018 00:44:10 -0700 Subject: C++: Delete PyCcLinkParamsProvider. No longer needed. RELNOTES:none PiperOrigin-RevId: 199593828 --- .../devtools/build/lib/rules/python/PyBinary.java | 1 - .../lib/rules/python/PyCcLinkParamsProvider.java | 43 ---------------------- .../devtools/build/lib/rules/python/PyLibrary.java | 1 - 3 files changed, 45 deletions(-) delete mode 100644 src/main/java/com/google/devtools/build/lib/rules/python/PyCcLinkParamsProvider.java 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 41e19c497c..07a1213bca 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 @@ -164,7 +164,6 @@ public abstract class PyBinary implements RuleConfiguredTargetFactory { CcLinkParams.Builder builder, boolean linkingStatically, boolean linkShared) { builder.addTransitiveTargets( ruleContext.getPrerequisites("deps", Mode.TARGET), - PyCcLinkParamsProvider.TO_LINK_PARAMS, CcLinkParamsStore.TO_LINK_PARAMS); } }; diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PyCcLinkParamsProvider.java b/src/main/java/com/google/devtools/build/lib/rules/python/PyCcLinkParamsProvider.java deleted file mode 100644 index 8a270ac306..0000000000 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PyCcLinkParamsProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2014 The Bazel Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -package com.google.devtools.build.lib.rules.python; - -import com.google.common.base.Function; -import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; -import com.google.devtools.build.lib.analysis.TransitiveInfoProvider; -import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable; -import com.google.devtools.build.lib.rules.cpp.AbstractCcLinkParamsStore; -import com.google.devtools.build.lib.rules.cpp.CcLinkParamsStore; -import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec; - -/** A target that provides C++ libraries to be linked into Python targets. */ -@Immutable -@AutoCodec -public final class PyCcLinkParamsProvider implements TransitiveInfoProvider { - private final CcLinkParamsStore store; - - public PyCcLinkParamsProvider(CcLinkParamsStore store) { - this.store = store; - } - - public AbstractCcLinkParamsStore getLinkParams() { - return store; - } - - public static final Function TO_LINK_PARAMS = - input -> { - PyCcLinkParamsProvider provider = input.getProvider(PyCcLinkParamsProvider.class); - return provider == null ? null : provider.getLinkParams(); - }; -} diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PyLibrary.java b/src/main/java/com/google/devtools/build/lib/rules/python/PyLibrary.java index e40a1ab978..97060f345c 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PyLibrary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/python/PyLibrary.java @@ -71,7 +71,6 @@ public abstract class PyLibrary implements RuleConfiguredTargetFactory { CcLinkParams.Builder builder, boolean linkingStatically, boolean linkShared) { builder.addTransitiveTargets( ruleContext.getPrerequisites("deps", Mode.TARGET), - PyCcLinkParamsProvider.TO_LINK_PARAMS, CcLinkParamsStore.TO_LINK_PARAMS); } }; -- cgit v1.2.3