Fix passing dex_preopt value to make

dex_preopt defaults to true, only pass LOCAL_DEX_PREOPT := false
if dex_preopt is explcitly set to false.

Test: m, examine framework.jar
Change-Id: Ica6ce06d14bbc720da9c5b26559b9768a8a7f5a8
This commit is contained in:
Colin Cross
2017-11-22 16:02:44 -08:00
parent b06ad36c1f
commit b4972e3d96

View File

@@ -36,7 +36,7 @@ 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 {
if library.deviceProperties.Dex_preopt != nil && *library.deviceProperties.Dex_preopt == false {
fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
}
}