aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar hlopko <hlopko@google.com>2018-04-30 05:42:48 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-04-30 05:44:22 -0700
commit13ba35885656455c7ad83704cf55fdace94c7cf2 (patch)
tree7cb5a8097c3e10720beeef165f45a848d2d291ef /src
parentb65eb1e952ffa70dee6f9d91b9d44eec2112ed42 (diff)
Automated rollback of commit dade44dab4a571acc710f0960a3afda0d7b183b3.
*** Reason for rollback *** Breaks 70k targets in nightly *** Original change description *** CppDebugPackageProvider is useful for more than just C++, so rename it. RELNOTES: None. PiperOrigin-RevId: 194773896
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppDebugPackageProvider.java (renamed from src/main/java/com/google/devtools/build/lib/rules/cpp/DebugPackageProvider.java)11
2 files changed, 9 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java
index 801606fc4a..d84045cf28 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java
@@ -542,8 +542,8 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory {
return ruleBuilder
.addProvider(RunfilesProvider.class, RunfilesProvider.simple(runfiles))
.addProvider(
- DebugPackageProvider.class,
- new DebugPackageProvider(
+ CppDebugPackageProvider.class,
+ new CppDebugPackageProvider(
ruleContext.getLabel(), strippedFile, executable, explicitDwpFile))
.setRunfilesSupport(runfilesSupport, executable)
.addProvider(
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/DebugPackageProvider.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppDebugPackageProvider.java
index f287c5e719..31d3f9d81f 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/DebugPackageProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppDebugPackageProvider.java
@@ -28,18 +28,19 @@ import javax.annotation.Nullable;
*/
@Immutable
@AutoCodec
-public final class DebugPackageProvider implements TransitiveInfoProvider {
+public final class CppDebugPackageProvider implements TransitiveInfoProvider {
private final Label targetLabel;
private final Artifact strippedArtifact;
private final Artifact unstrippedArtifact;
@Nullable private final Artifact dwpArtifact;
@AutoCodec.Instantiator
- public DebugPackageProvider(
+ public CppDebugPackageProvider(
Label targetLabel,
- @Nullable Artifact strippedArtifact,
+ Artifact strippedArtifact,
Artifact unstrippedArtifact,
@Nullable Artifact dwpArtifact) {
+ Preconditions.checkNotNull(strippedArtifact);
Preconditions.checkNotNull(unstrippedArtifact);
this.targetLabel = targetLabel;
this.strippedArtifact = strippedArtifact;
@@ -47,7 +48,9 @@ public final class DebugPackageProvider implements TransitiveInfoProvider {
this.dwpArtifact = dwpArtifact;
}
- /** Returns the label for the *_binary target. */
+ /**
+ * Returns the label for the cc_binary target.
+ */
public final Label getTargetLabel() {
return targetLabel;
}