diff options
author | 2017-09-14 23:24:06 +0200 | |
---|---|---|
committer | 2017-09-15 11:29:04 +0200 | |
commit | 7df9198a771ef2eabef396dcb7a21e6cbb3cabb0 (patch) | |
tree | e8929823a7012639db9a560589b89beacecdb757 /src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java | |
parent | 2e7b804d29f3c1fa979d8a226d62d970dada64e2 (diff) |
Support multiple command lines / params files in SpawnAction.
This is necessary for the upcoming Skylark implementation of param files.
PiperOrigin-RevId: 168744486
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java | 9 |
1 files changed, 5 insertions, 4 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 8c91d6be80..97b1742631 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 @@ -22,7 +22,7 @@ import com.google.common.collect.Iterables; import com.google.devtools.build.lib.actions.Action; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.ExecutionRequirements; -import com.google.devtools.build.lib.actions.ParameterFile; +import com.google.devtools.build.lib.actions.ParameterFile.ParameterFileType; import com.google.devtools.build.lib.analysis.ConfiguredTarget; import com.google.devtools.build.lib.analysis.OutputGroupProvider; import com.google.devtools.build.lib.analysis.RuleConfiguredTarget.Mode; @@ -35,6 +35,7 @@ import com.google.devtools.build.lib.analysis.RunfilesSupport; import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; import com.google.devtools.build.lib.analysis.actions.CustomCommandLine; import com.google.devtools.build.lib.analysis.actions.FileWriteAction; +import com.google.devtools.build.lib.analysis.actions.ParamFileInfo; import com.google.devtools.build.lib.analysis.actions.SpawnAction; import com.google.devtools.build.lib.analysis.test.ExecutionInfo; import com.google.devtools.build.lib.analysis.test.InstrumentedFilesProvider; @@ -627,7 +628,8 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory { CustomCommandLine.Builder commandLine = CustomCommandLine.builder(); Action[] build(RuleContext context) { - spawnAction.setCommandLine(commandLine.build()); + spawnAction.addCommandLine( + commandLine.build(), ParamFileInfo.builder(ParameterFileType.UNQUOTED).build()); return spawnAction.build(context); } } @@ -696,8 +698,7 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory { packager .spawnAction .addTransitiveInputs(dwpTools) - .setExecutable(cppConfiguration.getDwpExecutable()) - .useParameterFile(ParameterFile.ParameterFileType.UNQUOTED); + .setExecutable(cppConfiguration.getDwpExecutable()); return packager; } |