Support multiple rsp files in REParams
rewrapper supports a comma separate list of rsp files, replace REParams.RSPFile with REParmas.RSPFiles. Test: remoteexec_test.go Change-Id: I7850c071c23d368d6fad4480dd527d146c13c6d3
This commit is contained in:
@@ -64,9 +64,8 @@ type REParams struct {
|
||||
ExecStrategy string
|
||||
// Inputs is a list of input paths or ninja variables.
|
||||
Inputs []string
|
||||
// RSPFile is the name of the ninja variable used by the rule as a placeholder for an rsp
|
||||
// input.
|
||||
RSPFile string
|
||||
// RSPFiles is the name of the files used by the rule as a placeholder for an rsp input.
|
||||
RSPFiles []string
|
||||
// OutputFiles is a list of output file paths or ninja variables as placeholders for rule
|
||||
// outputs.
|
||||
OutputFiles []string
|
||||
@@ -134,8 +133,8 @@ func (r *REParams) wrapperArgs() string {
|
||||
args += " --inputs=" + strings.Join(r.Inputs, ",")
|
||||
}
|
||||
|
||||
if r.RSPFile != "" {
|
||||
args += " --input_list_paths=" + r.RSPFile
|
||||
if len(r.RSPFiles) > 0 {
|
||||
args += " --input_list_paths=" + strings.Join(r.RSPFiles, ",")
|
||||
}
|
||||
|
||||
if len(r.OutputFiles) > 0 {
|
||||
|
@@ -45,14 +45,14 @@ func TestTemplate(t *testing.T) {
|
||||
Inputs: []string{"$in"},
|
||||
OutputFiles: []string{"$out"},
|
||||
ExecStrategy: "remote",
|
||||
RSPFile: "$out.rsp",
|
||||
RSPFiles: []string{"$out.rsp", "out2.rsp"},
|
||||
ToolchainInputs: []string{"clang++"},
|
||||
Platform: map[string]string{
|
||||
ContainerImageKey: DefaultImage,
|
||||
PoolKey: "default",
|
||||
},
|
||||
},
|
||||
want: fmt.Sprintf("${android.RBEWrapper} --labels=compiler=clang,lang=cpp,type=compile --platform=\"Pool=default,container-image=%s\" --exec_strategy=remote --inputs=$in --input_list_paths=$out.rsp --output_files=$out --toolchain_inputs=clang++ -- ", DefaultImage),
|
||||
want: fmt.Sprintf("${android.RBEWrapper} --labels=compiler=clang,lang=cpp,type=compile --platform=\"Pool=default,container-image=%s\" --exec_strategy=remote --inputs=$in --input_list_paths=$out.rsp,out2.rsp --output_files=$out --toolchain_inputs=clang++ -- ", DefaultImage),
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
|
Reference in New Issue
Block a user