aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar plf <plf@google.com>2018-03-29 05:11:58 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-03-29 05:13:43 -0700
commit6fc594815dae501077e3b038b256c1f9249b58df (patch)
tree22ac48d57617498e522f94a86fa33f3da14aa5eb
parent7109d274aa0c7dc938c1846c5ebba57ab2f2a0d9 (diff)
C++: Remove headers from input to linking action.
Headers were made an input to the linking action simply to get an error when we have a src-less cc_library with declared but missing headers. Since there was no compilation action, the headers were not an input to any action and there was no error when the files were missing. After discussing it with the team, it was decided that this is not needed anymore. Files can be missing as long as they are not consumed. RELNOTES:none PiperOrigin-RevId: 190915591
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CcLinkingHelper.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLinkingHelper.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLinkingHelper.java
index f8da2e705a..2606f9056c 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLinkingHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLinkingHelper.java
@@ -161,7 +161,6 @@ public final class CcLinkingHelper {
private final List<TransitiveInfoCollection> deps = new ArrayList<>();
private final NestedSetBuilder<Artifact> linkstamps = NestedSetBuilder.stableOrder();
private final List<Artifact> linkActionInputs = new ArrayList<>();
- private CcCompilationInfo ccCompilationInfo;
@Nullable private Artifact dynamicLibrary;
private LinkTargetType linkType = LinkTargetType.STATIC_LIBRARY;
@@ -454,8 +453,6 @@ public final class CcLinkingHelper {
}
}
- this.ccCompilationInfo = ccCompilationInfo;
-
// Create link actions (only if there are object files or if explicitly requested).
CcLinkingOutputs ccLinkingOutputs = CcLinkingOutputs.EMPTY;
if (emitLinkActionsIfEmpty || !ccOutputs.isEmpty()) {
@@ -983,8 +980,7 @@ public final class CcLinkingHelper {
private CppLinkActionBuilder newLinkActionBuilder(Artifact outputArtifact) {
return new CppLinkActionBuilder(
ruleContext, outputArtifact, ccToolchain, fdoSupport, featureConfiguration, semantics)
- .setCrosstoolInputs(ccToolchain.getLink())
- .addNonCodeInputs(ccCompilationInfo.getTransitiveCompilationPrerequisites());
+ .setCrosstoolInputs(ccToolchain.getLink());
}
/**