Add more dex_preopt properties
Move dex_preopt to dex_preopt.enabled, and add dex_preopt.app_image, dex_preopt.profile_guided, and dex_preopt.profile. These values will be passed back to Make if provided to control dex preopting. Test: m checkbuild Change-Id: I54a4b1de697a08be20ab65d2a5dc43ce0046692d
This commit is contained in:
@@ -36,8 +36,18 @@ func (library *Library) AndroidMk() android.AndroidMkData {
|
||||
}
|
||||
if library.dexJarFile != nil {
|
||||
fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", library.dexJarFile.String())
|
||||
if library.deviceProperties.Dex_preopt != nil && *library.deviceProperties.Dex_preopt == false {
|
||||
fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
|
||||
if library.deviceProperties.Dex_preopt.Enabled != nil {
|
||||
fmt.Fprintln(w, "LOCAL_DEX_PREOPT :=", *library.deviceProperties.Dex_preopt.Enabled)
|
||||
}
|
||||
if library.deviceProperties.Dex_preopt.App_image != nil {
|
||||
fmt.Fprintln(w, "LOCAL_DEX_PREOPT_APP_IMAGE :=", *library.deviceProperties.Dex_preopt.App_image)
|
||||
}
|
||||
if library.deviceProperties.Dex_preopt.Profile_guided != nil {
|
||||
fmt.Fprintln(w, "LOCAL_DEX_PREOPT_GENERATE_PROFILE :=", *library.deviceProperties.Dex_preopt.Profile_guided)
|
||||
}
|
||||
if library.deviceProperties.Dex_preopt.Profile != nil {
|
||||
fmt.Fprintln(w, "LOCAL_DEX_PREOPT_GENERATE_PROFILE := true")
|
||||
fmt.Fprintln(w, "LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING := $(LOCAL_PATH)/"+*library.deviceProperties.Dex_preopt.Profile)
|
||||
}
|
||||
}
|
||||
fmt.Fprintln(w, "LOCAL_SDK_VERSION :=", String(library.deviceProperties.Sdk_version))
|
||||
|
Reference in New Issue
Block a user