Merge "Replace DEX_FLAGS by flags for D8 and R8." am: d5a57a5679
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2059767 Change-Id: I43703b2d2fbbdfe5094c8d1a396789d985e61fb3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
1b50e80f92
2 changed files with 15 additions and 17 deletions
|
@ -68,6 +68,11 @@ var (
|
|||
"-J-XX:+TieredCompilation",
|
||||
"-J-XX:TieredStopAtLevel=1",
|
||||
}
|
||||
dexerJavaVmFlagsList = []string{
|
||||
`-JXX:OnError="cat hs_err_pid%p.log"`,
|
||||
"-JXX:CICompilerCount=6",
|
||||
"-JXX:+UseDynamicNumberOfGCThreads",
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -83,19 +88,14 @@ func init() {
|
|||
|
||||
// D8 invocations are shorter lived, so we restrict their JIT tiering relative to R8.
|
||||
// Note that the `-JXX` prefix syntax is specific to the R8/D8 invocation wrappers.
|
||||
exportedVars.ExportStringListStaticVariable("D8Flags", []string{
|
||||
`-JXX:OnError="cat hs_err_pid%p.log"`,
|
||||
"-JXX:CICompilerCount=6",
|
||||
"-JXX:+UseDynamicNumberOfGCThreads",
|
||||
exportedVars.ExportStringListStaticVariable("D8Flags", append([]string{
|
||||
"-JXmx2048M",
|
||||
"-JXX:+TieredCompilation",
|
||||
"-JXX:TieredStopAtLevel=1",
|
||||
})
|
||||
|
||||
exportedVars.ExportStringListStaticVariable("R8Flags", []string{
|
||||
`-JXX:OnError="cat hs_err_pid%p.log"`,
|
||||
"-JXX:CICompilerCount=6",
|
||||
"-JXX:+UseDynamicNumberOfGCThreads",
|
||||
})
|
||||
}, dexerJavaVmFlagsList...))
|
||||
exportedVars.ExportStringListStaticVariable("R8Flags", append([]string{
|
||||
"-JXmx2048M",
|
||||
}, dexerJavaVmFlagsList...))
|
||||
|
||||
exportedVars.ExportStringListStaticVariable("CommonJdkFlags", []string{
|
||||
`-Xmaxerrs 9999999`,
|
||||
|
|
|
@ -43,9 +43,10 @@ func makeVarsProvider(ctx android.MakeVarsContext) {
|
|||
ctx.Strict("JAVADOC", "${JavadocCmd}")
|
||||
ctx.Strict("COMMON_JDK_FLAGS", "${CommonJdkFlags}")
|
||||
|
||||
ctx.Strict("DX", "${D8Cmd}")
|
||||
ctx.Strict("DX_COMMAND", "${D8Cmd} -JXms16M -JXmx2048M")
|
||||
ctx.Strict("R8_COMPAT_PROGUARD", "${R8Cmd}")
|
||||
ctx.Strict("D8", "${D8Cmd}")
|
||||
ctx.Strict("R8", "${R8Cmd}")
|
||||
ctx.Strict("D8_COMMAND", "${D8Cmd} ${D8Flags}")
|
||||
ctx.Strict("R8_COMMAND", "${R8Cmd} ${R8Flags}")
|
||||
|
||||
ctx.Strict("TURBINE", "${TurbineJar}")
|
||||
|
||||
|
@ -78,9 +79,6 @@ func makeVarsProvider(ctx android.MakeVarsContext) {
|
|||
ctx.Strict("CLASS2NONSDKLIST", "${Class2NonSdkList}")
|
||||
ctx.Strict("HIDDENAPI", "${HiddenAPI}")
|
||||
|
||||
ctx.Strict("D8_FLAGS", "${D8Flags}")
|
||||
ctx.Strict("R8_FLAGS", "${R8Flags}")
|
||||
|
||||
ctx.Strict("AIDL", "${AidlCmd}")
|
||||
ctx.Strict("AAPT2", "${Aapt2Cmd}")
|
||||
ctx.Strict("ZIPALIGN", "${ZipAlign}")
|
||||
|
|
Loading…
Reference in a new issue