diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/AarGeneratorBuilder.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AarGeneratorBuilder.java | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AarGeneratorBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/android/AarGeneratorBuilder.java index a98bca904d..eb6169eee6 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AarGeneratorBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AarGeneratorBuilder.java @@ -128,25 +128,23 @@ public class AarGeneratorBuilder { args.add("--throwOnResourceConflict"); } - ParamFileInfo paramFileInfo = null; - if (OS.getCurrent() == OS.WINDOWS) { - // Some flags (e.g. --mainData) may specify lists (or lists of lists) separated by special - // characters (colon, semicolon, hashmark, ampersand) that don't work on Windows, and quoting - // semantics are very complicated (more so than in Bash), so let's just always use a parameter - // file. - // TODO(laszlocsomor), TODO(corysmith): restructure the Android BusyBux's flags by deprecating - // list-type and list-of-list-type flags that use such problematic separators in favor of - // multi-value flags (to remove one level of listing) and by changing all list separators to a - // platform-safe character (= comma). - paramFileInfo = ParamFileInfo.builder(ParameterFileType.UNQUOTED).setUseAlways(true).build(); - } + ParamFileInfo.Builder paramFileInfo = ParamFileInfo.builder(ParameterFileType.SHELL_QUOTED); + // Some flags (e.g. --mainData) may specify lists (or lists of lists) separated by special + // characters (colon, semicolon, hashmark, ampersand) that don't work on Windows, and quoting + // semantics are very complicated (more so than in Bash), so let's just always use a parameter + // file. + // TODO(laszlocsomor), TODO(corysmith): restructure the Android BusyBux's flags by deprecating + // list-type and list-of-list-type flags that use such problematic separators in favor of + // multi-value flags (to remove one level of listing) and by changing all list separators to a + // platform-safe character (= comma). + paramFileInfo.setUseAlways(OS.getCurrent() == OS.WINDOWS); ruleContext.registerAction( this.builder .useDefaultShellEnvironment() .addInputs(ImmutableList.<Artifact>copyOf(ins)) .addOutputs(ImmutableList.<Artifact>copyOf(outs)) - .addCommandLine(CommandLine.of(args), paramFileInfo) + .addCommandLine(CommandLine.of(args), paramFileInfo.build()) .setExecutable( ruleContext.getExecutablePrerequisite("$android_resources_busybox", Mode.HOST)) .setProgressMessage("Building AAR package for %s", ruleContext.getLabel()) |