diff options
author | Mathieu Chartier <mathieuc@google.com> | 2019-06-26 10:01:36 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2019-06-26 14:54:47 -0700 |
commit | 6adeee1131c87ecfba36d154165959d477b9d890 (patch) | |
tree | d353e4fb2aa5a8481cffe566a3611d9546a35947 | |
parent | a6c4ff2cc815d9e467b31ec84799094ad1f714e7 (diff) | |
download | build_soong-6adeee1131c87ecfba36d154165959d477b9d890.tar.gz build_soong-6adeee1131c87ecfba36d154165959d477b9d890.tar.bz2 build_soong-6adeee1131c87ecfba36d154165959d477b9d890.zip |
Revert "Revert "Remove option to create boot image based on preloaded classes""
Test: make
Test: build/soong/scripts/build-ndk-prebuilts.sh
This reverts commit d3f688b521438556f62495d2ed7cacc3a2768b36.
Change-Id: Ia8898d11d67e5f0c4d8886f13d29f5dbd5f8609b
-rw-r--r-- | dexpreopt/config.go | 16 | ||||
-rw-r--r-- | java/dexpreopt_bootjars.go | 4 | ||||
-rw-r--r-- | java/dexpreopt_bootjars_test.go | 1 | ||||
-rw-r--r-- | java/dexpreopt_config.go | 3 |
4 files changed, 9 insertions, 15 deletions
diff --git a/dexpreopt/config.go b/dexpreopt/config.go index a2f1af4a..3e329584 100644 --- a/dexpreopt/config.go +++ b/dexpreopt/config.go @@ -79,13 +79,11 @@ type GlobalConfig struct { InstructionSetFeatures map[android.ArchType]string // instruction set for each architecture // Only used for boot image - DirtyImageObjects android.OptionalPath // path to a dirty-image-objects file - PreloadedClasses android.OptionalPath // path to a preloaded-classes file - BootImageProfiles android.Paths // path to a boot-image-profile.txt file - UseProfileForBootImage bool // whether a profile should be used to compile the boot image - BootFlags string // extra flags to pass to 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 + DirtyImageObjects android.OptionalPath // path to a dirty-image-objects file + BootImageProfiles android.Paths // path to a boot-image-profile.txt file + BootFlags string // extra flags to pass to 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 Tools Tools // paths to tools possibly used by the generated commands } @@ -183,7 +181,6 @@ func LoadGlobalConfig(ctx android.PathContext, path string) (GlobalConfig, []byt // Copies of entries in GlobalConfig that are not constructable without extra parameters. They will be // used to construct the real value manually below. DirtyImageObjects string - PreloadedClasses string BootImageProfiles []string Tools struct { @@ -206,7 +203,6 @@ func LoadGlobalConfig(ctx android.PathContext, path string) (GlobalConfig, []byt // Construct paths that require a PathContext. config.GlobalConfig.DirtyImageObjects = android.OptionalPathForPath(constructPath(ctx, config.DirtyImageObjects)) - config.GlobalConfig.PreloadedClasses = android.OptionalPathForPath(constructPath(ctx, config.PreloadedClasses)) config.GlobalConfig.BootImageProfiles = constructPaths(ctx, config.BootImageProfiles) config.GlobalConfig.Tools.Profman = constructPath(ctx, config.Tools.Profman) @@ -321,9 +317,7 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig { CpuVariant: nil, InstructionSetFeatures: nil, DirtyImageObjects: android.OptionalPath{}, - PreloadedClasses: android.OptionalPath{}, BootImageProfiles: nil, - UseProfileForBootImage: false, BootFlags: "", Dex2oatImageXmx: "", Dex2oatImageXms: "", diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index eb735c16..fe468a9e 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -286,8 +286,6 @@ func buildBootImageRuleForArch(ctx android.SingletonContext, image *bootImage, if profile != nil { cmd.FlagWithArg("--compiler-filter=", "speed-profile") cmd.FlagWithInput("--profile-file=", profile) - } else if global.PreloadedClasses.Valid() { - cmd.FlagWithInput("--image-classes=", global.PreloadedClasses.Path()) } if global.DirtyImageObjects.Valid() { @@ -374,7 +372,7 @@ Rebuild with ART_BOOT_IMAGE_EXTRA_ARGS="--runtime-arg -verbose:verifier" to see func bootImageProfileRule(ctx android.SingletonContext, image *bootImage, missingDeps []string) android.WritablePath { global := dexpreoptGlobalConfig(ctx) - if !global.UseProfileForBootImage || ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() { + if global.DisableGenerateProfile || ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() { return nil } return ctx.Config().Once(bootImageProfileRuleKey, func() interface{} { diff --git a/java/dexpreopt_bootjars_test.go b/java/dexpreopt_bootjars_test.go index cbb52f15..f91ff692 100644 --- a/java/dexpreopt_bootjars_test.go +++ b/java/dexpreopt_bootjars_test.go @@ -62,6 +62,7 @@ func TestDexpreoptBootJars(t *testing.T) { bootArt := dexpreoptBootJars.Output("boot.art") expectedInputs := []string{ + "dex_bootjars/boot.prof", "dex_bootjars_input/foo.jar", "dex_bootjars_input/bar.jar", "dex_bootjars_input/baz.jar", diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go index c396d3ea..4a4d6d57 100644 --- a/java/dexpreopt_config.go +++ b/java/dexpreopt_config.go @@ -49,7 +49,8 @@ func dexpreoptGlobalConfigRaw(ctx android.PathContext) globalConfigAndRaw { return ctx.Config().Once(dexpreoptTestGlobalConfigKey, func() interface{} { // Nope, return a config with preopting disabled return globalConfigAndRaw{dexpreopt.GlobalConfig{ - DisablePreopt: true, + DisablePreopt: true, + DisableGenerateProfile: true, }, nil} }) }).(globalConfigAndRaw) |