aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2017-08-14 18:13:46 +0200
committerGravatar Irina Iancu <elenairina@google.com>2017-08-16 11:03:51 +0200
commit86f6dc25a6ce8e50ce237c19a434d4e871fd0f73 (patch)
tree612c31b3b574ccb8c0948908a8011571c53dca5c /src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java
parent55245e478fcfe8b898e39c7462bc975ba7548325 (diff)
Add @CompileTimeConstant annotations to CustomCommandLine.
This enforces certain memory-efficient patterns. For deliberate use of dynamic strings, explicitly named overloads are introduced, with javadoc that guides the programmer into making the right choice. This CL is a memory no-op on benchmarks, but it tries to prevent backslide by making sure programmers make conscious choices when they construct their command lines. RELNOTES: None PiperOrigin-RevId: 165185997
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java
index 93f0c9a1b9..d7322d0f8e 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java
@@ -470,12 +470,12 @@ final class ProtobufSupport {
private CustomCommandLine getGenerationCommandLine(Artifact protoInputsFile) {
return new Builder()
.add("--input-file-list")
- .add(protoInputsFile.getExecPathString())
+ .add(protoInputsFile)
.add("--output-dir")
- .add(getWorkspaceRelativeOutputDir().getSafePathString())
+ .addDynamicString(getWorkspaceRelativeOutputDir().getSafePathString())
.add("--force")
.add("--proto-root-dir")
- .add(getGenfilesPathString())
+ .addDynamicString(getGenfilesPathString())
.add("--proto-root-dir")
.add(".")
.add(VectorArg.of(portableProtoFilters).beforeEach("--config"))