diff options
author | 2018-01-26 18:30:36 -0800 | |
---|---|---|
committer | 2018-02-13 15:13:01 -0800 | |
commit | 674dd932d8a60877b71147bd426d7b88a613f4ad (patch) | |
tree | 41e163d147e71c28de9076415580dba1a99d9140 /java/builder.go | |
parent | 1d29875829712eb37d0a1808716c94126018e52d (diff) |
Add Respfile support for soong_zip.
Sometime the size of our command line passed to soong_zip go program
exceeds the cmdline size limit. So add an RespFile support with "@" special
character prefix.
The args in the cmdline will be considered together with the
args in RespFile during soong_zip running.
Test: real tests in my local machine, and compare the
res/libphonenumber.jar before and after changes.
./cmd -o test.zip '""'-C -> [./cmd,-o,test.zip,""-C]
./cmd -o test.zip '-C -f -> [./cmd,-o,test.zip,-C -f]
./cmd -o test.zip '\"'-C -f -> [./cmd,-o,test.zip,\"-C -f]
./cmd -o test.zip '\\'-C -f -> [./cmd,-o,test.zip,\\-C -f]
./cmd -o test.zip '\a'-C -f -> [./cmd,-o,test.zip,\a-C -f]
./cmd -o test.zip \'-C -> [./cmd,-o,test.zip,'-C]
./cmd -o test.zip \\-C -> [./cmd,-o,test.zip,\-C]
./cmd -o test.zip \"-C -> [./cmd,-o,test.zip,"-C]
./cmd -o test.zip "'"-C -> [./cmd,-o,test.zip,'-C]
./cmd -o test.zip "\\"-C -f -> [./cmd,-o,test.zip,\a-C -f]
./cmd -o test.zip "\""-C -f -> [./cmd,-o,test.zip,"a-C -f]
Bug: b/72484223
Change-Id: I83c3630b70c8396c8e8a3f266244d868d754c4e8
Diffstat (limited to 'java/builder.go')
-rw-r--r-- | java/builder.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/builder.go b/java/builder.go index 2fd4ac047..72574f197 100644 --- a/java/builder.go +++ b/java/builder.go @@ -123,8 +123,10 @@ var ( jar = pctx.AndroidStaticRule("jar", blueprint.RuleParams{ - Command: `${config.SoongZipCmd} -jar -o $out $jarArgs`, - CommandDeps: []string{"${config.SoongZipCmd}"}, + Command: `${config.SoongZipCmd} -jar -o $out @$out.rsp`, + CommandDeps: []string{"${config.SoongZipCmd}"}, + Rspfile: "$out.rsp", + RspfileContent: "$jarArgs", }, "jarArgs") |