aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2017-08-22 22:33:36 +0200
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2017-08-23 13:31:27 +0200
commitd6869f13d15e56829cf614068abfa91cbe925979 (patch)
treed9ccd57f7c2428e4b9b913a764984429a3d6472e /src/main/java/com/google
parent3595c9566bca1afae252375130bc9d6a4b7bd1ac (diff)
Use CustomCommandLine directly instead of via SpawnAction.Builder.
This change forces use of CustomCommandLine.Builder, which has a richer interface for constructing memory-efficient command lines. It will also permit surveying the code base for inefficient patterns using an IDE. This change was done by hand and split using Rosie to assist with rollbacks in case of bugs. Reviewers, please pay particular attention to: * Each all to addInputArgument/addOutputArgument should come with a corresponding matching pair to SpawnAction.Builder#addInput and CustomCommandLine.Builder#addExecPath (eg.). * The commandLine must be set on the SpawnAction using SpawnAction.Builder#setCommandLine. Note that most calls to addPrefixed("arg=", val) should be more idiomatically expressed as add("arg", val), but this involves changing tests and making sure that the command line tools can accept the format. PiperOrigin-RevId: 166106115
Diffstat (limited to 'src/main/java/com/google')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java
index b96f37d418..d9d25fc5ba 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/BundleSupport.java
@@ -374,10 +374,13 @@ final class BundleSupport {
new SpawnAction.Builder()
.setMnemonic("MergeInfoPlistFiles")
.setExecutable(attributes.plmerge())
- .addArgument("--control")
- .addInputArgument(plMergeControlArtifact)
.addTransitiveInputs(mergingContentArtifacts)
.addOutput(bundling.getIntermediateArtifacts().mergedInfoplist())
+ .addInput(plMergeControlArtifact)
+ .setCommandLine(
+ CustomCommandLine.builder()
+ .addExecPath("--control", plMergeControlArtifact)
+ .build())
.build(ruleContext));
}