Change position of R8/D8 flags on the command line.

The wrapper script requires that all -J* options are passed first.

Test: m
Change-Id: Idd1da394c8a46db3485a1b31284eb6f398e3ba27
This commit is contained in:
David Srbecky 2023-11-24 15:57:54 +00:00
parent 55edc0cd2d
commit bda964cf90

View file

@ -106,7 +106,7 @@ func (d *dexer) effectiveOptimizeEnabled() bool {
var d8, d8RE = pctx.MultiCommandRemoteStaticRules("d8",
blueprint.RuleParams{
Command: `rm -rf "$outDir" && mkdir -p "$outDir" && ` +
`$d8Template${config.D8Cmd} ${config.D8Flags} --output $outDir $d8Flags --no-dex-input-jar $in && ` +
`$d8Template${config.D8Cmd} ${config.D8Flags} $d8Flags --output $outDir --no-dex-input-jar $in && ` +
`$zipTemplate${config.SoongZipCmd} $zipFlags -o $outDir/classes.dex.jar -C $outDir -f "$outDir/classes*.dex" && ` +
`${config.MergeZipsCmd} -D -stripFile "**/*.class" $mergeZipsFlags $out $outDir/classes.dex.jar $in && ` +
`rm -f "$outDir/classes*.dex" "$outDir/classes.dex.jar"`,
@ -137,13 +137,12 @@ var r8, r8RE = pctx.MultiCommandRemoteStaticRules("r8",
Command: `rm -rf "$outDir" && mkdir -p "$outDir" && ` +
`rm -f "$outDict" && rm -f "$outConfig" && rm -rf "${outUsageDir}" && ` +
`mkdir -p $$(dirname ${outUsage}) && ` +
`$r8Template${config.R8Cmd} ${config.R8Flags} -injars $in --output $outDir ` +
`$r8Template${config.R8Cmd} ${config.R8Flags} $r8Flags -injars $in --output $outDir ` +
`--no-data-resources ` +
`-printmapping ${outDict} ` +
`-printconfiguration ${outConfig} ` +
`-printusage ${outUsage} ` +
`--deps-file ${out}.d ` +
`$r8Flags && ` +
`--deps-file ${out}.d && ` +
`touch "${outDict}" "${outConfig}" "${outUsage}" && ` +
`${config.SoongZipCmd} -o ${outUsageZip} -C ${outUsageDir} -f ${outUsage} && ` +
`rm -rf ${outUsageDir} && ` +