From 86f6dc25a6ce8e50ce237c19a434d4e871fd0f73 Mon Sep 17 00:00:00 2001 From: tomlu Date: Mon, 14 Aug 2017 18:13:46 +0200 Subject: 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 --- .../com/google/devtools/build/lib/rules/objc/ProtobufSupport.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java') 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")) -- cgit v1.2.3