Merge "Use compiler filter "verify" for dexpreopt w/o class loader context." am: 8838dce471
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610787 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ibe9b25e2e673701417e45b36bd54efd853544a05
This commit is contained in:
committed by
Automerger Merge Worker
commit
868c93677f
@@ -85,7 +85,7 @@ type GlobalConfig struct {
|
|||||||
Dex2oatImageXmx string // max heap size for dex2oat for the boot image
|
Dex2oatImageXmx string // max heap size for dex2oat for the boot image
|
||||||
Dex2oatImageXms string // initial heap size for dex2oat for the boot image
|
Dex2oatImageXms string // initial heap size for dex2oat for the boot image
|
||||||
|
|
||||||
// If true, downgrade the compiler filter of dexpreopt to "extract" when verify_uses_libraries
|
// If true, downgrade the compiler filter of dexpreopt to "verify" when verify_uses_libraries
|
||||||
// check fails, instead of failing the build. This will disable any AOT-compilation.
|
// check fails, instead of failing the build. This will disable any AOT-compilation.
|
||||||
//
|
//
|
||||||
// The intended use case for this flag is to have a smoother migration path for the Java
|
// The intended use case for this flag is to have a smoother migration path for the Java
|
||||||
|
@@ -369,11 +369,11 @@ func dexpreoptCommand(ctx android.PathContext, globalSoong *GlobalSoongConfig, g
|
|||||||
}
|
}
|
||||||
if module.EnforceUsesLibraries {
|
if module.EnforceUsesLibraries {
|
||||||
// If the verify_uses_libraries check failed (in this case status file contains a
|
// If the verify_uses_libraries check failed (in this case status file contains a
|
||||||
// non-empty error message), then use "extract" compiler filter to avoid compiling any
|
// non-empty error message), then use "verify" compiler filter to avoid compiling any
|
||||||
// code (it would be rejected on device because of a class loader context mismatch).
|
// code (it would be rejected on device because of a class loader context mismatch).
|
||||||
cmd.Text("--compiler-filter=$(if test -s ").
|
cmd.Text("--compiler-filter=$(if test -s ").
|
||||||
Input(module.EnforceUsesLibrariesStatusFile).
|
Input(module.EnforceUsesLibrariesStatusFile).
|
||||||
Text(" ; then echo extract ; else echo " + compilerFilter + " ; fi)")
|
Text(" ; then echo verify ; else echo " + compilerFilter + " ; fi)")
|
||||||
} else {
|
} else {
|
||||||
cmd.FlagWithArg("--compiler-filter=", compilerFilter)
|
cmd.FlagWithArg("--compiler-filter=", compilerFilter)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user