diff options
author | 2017-07-06 21:09:30 -0400 | |
---|---|---|
committer | 2017-07-07 07:08:31 -0400 | |
commit | cf483e472790fad1503c5728f7c91dd84f7d9348 (patch) | |
tree | 9f4de8985ec31897bec9b8ab437a1a24cc22150b /src/main/java/com/google/devtools/build/lib/rules/objc/ProtocolBuffers2Support.java | |
parent | 62d9276be1a3c4840dc8dd8839480308528f97c1 (diff) |
Switch from using set/getPchFile on CompilationArtifacts to a doNotUsePch option on CompilationSupport. In the process correctly respect whether to use the pch file under crosstool compilation mode.
PiperOrigin-RevId: 161156717
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/ProtocolBuffers2Support.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/ProtocolBuffers2Support.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ProtocolBuffers2Support.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ProtocolBuffers2Support.java index d3f8bbf085..8139368952 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ProtocolBuffers2Support.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ProtocolBuffers2Support.java @@ -14,7 +14,6 @@ package com.google.devtools.build.lib.rules.objc; -import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; @@ -87,7 +86,11 @@ final class ProtocolBuffers2Support { public ProtocolBuffers2Support registerCompilationActions() throws RuleErrorException, InterruptedException { CompilationSupport compilationSupport = - new CompilationSupport.Builder().setRuleContext(ruleContext).doNotUseDeps().build(); + new CompilationSupport.Builder() + .setRuleContext(ruleContext) + .doNotUseDeps() + .doNotUsePch() + .build(); compilationSupport.registerCompileAndArchiveActions(getCommon()); return this; @@ -132,7 +135,6 @@ final class ProtocolBuffers2Support { Iterable<Artifact> generatedSources = getGeneratedProtoOutputs(getSourceExtension()); return new CompilationArtifacts.Builder() .setIntermediateArtifacts(new IntermediateArtifacts(ruleContext, "")) - .setPchFile(Optional.<Artifact>absent()) .addAdditionalHdrs(getGeneratedProtoOutputs(getHeaderExtension())) .addAdditionalHdrs(generatedSources) .addNonArcSrcs(generatedSources) |