Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27901a19 authored by Colin Cross's avatar Colin Cross Committed by android-build-merger
Browse files

Merge "Revert "Update calls to dexpreopt_gen"" am: 5b8e3837

am: 6393b2e0

Change-Id: I6aef7e496c37763dcf80a88548d3380b3eb5bc49
parents 68ac3ecf 6393b2e0
Loading
Loading
Loading
Loading
+26 −8
Original line number Diff line number Diff line
@@ -47,9 +47,9 @@ endif
# Default to debug version to help find bugs.
# Set USE_DEX2OAT_DEBUG to false for only building non-debug versions.
ifeq ($(USE_DEX2OAT_DEBUG),false)
DEX2OAT := $(SOONG_HOST_OUT_EXECUTABLES)/dex2oat$(HOST_EXECUTABLE_SUFFIX)
DEX2OAT := $(HOST_OUT_EXECUTABLES)/dex2oat$(HOST_EXECUTABLE_SUFFIX)
else
DEX2OAT := $(SOONG_HOST_OUT_EXECUTABLES)/dex2oatd$(HOST_EXECUTABLE_SUFFIX)
DEX2OAT := $(HOST_OUT_EXECUTABLES)/dex2oatd$(HOST_EXECUTABLE_SUFFIX)
endif

DEX2OAT_DEPENDENCY += $(DEX2OAT)
@@ -62,6 +62,25 @@ PRELOADED_CLASSES := $(call word-colon,1,$(firstword \
DIRTY_IMAGE_OBJECTS := $(call word-colon,1,$(firstword \
    $(filter %system/etc/dirty-image-objects,$(PRODUCT_COPY_FILES))))

# If we use a boot image profile.
my_use_profile_for_boot_image := $(PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE)
ifeq (,$(my_use_profile_for_boot_image))
  # If not set, set the default to true if we are not a PDK build. PDK builds
  # can't build the profile since they don't have frameworks/base.
  ifneq (true,$(TARGET_BUILD_PDK))
    my_use_profile_for_boot_image := true
  endif
endif

ifeq (true,$(my_use_profile_for_boot_image))
  boot_image_profiles := $(PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION)

  ifeq (,$(boot_image_profiles))
  # If not set, use the default.
  boot_image_profiles := frameworks/base/config/boot-image-profile.txt
  endif
endif

define get-product-default-property
$(strip \
  $(eval _prop := $(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))))\
@@ -136,16 +155,15 @@ ifeq ($(WRITE_SOONG_VARIABLES),true)

  $(call add_json_str,  DirtyImageObjects,                  $(DIRTY_IMAGE_OBJECTS))
  $(call add_json_str,  PreloadedClasses,                   $(PRELOADED_CLASSES))
  $(call add_json_list, BootImageProfiles,                  $(PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION))
  $(call add_json_bool, UseProfileForBootImage,             $(call invert_bool,$(filter false,$(PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE))))
  $(call add_json_list, BootImageProfiles,                  $(boot_image_profiles))
  $(call add_json_str,  BootFlags,                          $(PRODUCT_DEX_PREOPT_BOOT_FLAGS))
  $(call add_json_str,  Dex2oatImageXmx,                    $(DEX2OAT_IMAGE_XMX))
  $(call add_json_str,  Dex2oatImageXms,                    $(DEX2OAT_IMAGE_XMS))

  $(call add_json_map,  Tools)
  $(call add_json_str,  Profman,                            $(SOONG_HOST_OUT_EXECUTABLES)/profman)
  $(call add_json_str,  Profman,                            $(PROFMAN))
  $(call add_json_str,  Dex2oat,                            $(DEX2OAT))
  $(call add_json_str,  Aapt,                               $(SOONG_HOST_OUT_EXECUTABLES)/aapt)
  $(call add_json_str,  Aapt,                               $(AAPT))
  $(call add_json_str,  SoongZip,                           $(SOONG_ZIP))
  $(call add_json_str,  Zip2zip,                            $(ZIP2ZIP))
  $(call add_json_str,  VerifyUsesLibraries,                $(BUILD_SYSTEM)/verify_uses_libraries.sh)
@@ -172,9 +190,9 @@ $(DEX_PREOPT_CONFIG):
	@#empty

DEXPREOPT_GEN_DEPS := \
  $(SOONG_HOST_OUT_EXECUTABLES)/profman \
  $(PROFMAN) \
  $(DEX2OAT) \
  $(SOONG_HOST_OUT_EXECUTABLES)/aapt \
  $(AAPT) \
  $(SOONG_ZIP) \
  $(ZIP2ZIP) \
  $(BUILD_SYSTEM)/verify_uses_libraries.sh \
+4 −5
Original line number Diff line number Diff line
@@ -190,12 +190,10 @@ ifdef LOCAL_DEX_PREOPT

  $(call json_start)

  # DexPath, StripInputPath, and StripOutputPath are not set, they will
  # be filled in by dexpreopt_gen.

  $(call add_json_str,  Name,                           $(LOCAL_MODULE))
  $(call add_json_str,  DexLocation,                    $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE)))
  $(call add_json_str,  BuildPath,                      $(LOCAL_BUILT_MODULE))
  $(call add_json_str,  DexPath,                        $$1)
  $(call add_json_str,  ExtrasOutputPath,               $$2)
  $(call add_json_bool, Privileged,                     $(filter true,$(LOCAL_PRIVILEGED_MODULE)))
  $(call add_json_bool, UncompressedDex,                $(filter true,$(LOCAL_UNCOMPRESS_DEX)))
@@ -220,6 +218,8 @@ ifdef LOCAL_DEX_PREOPT
  $(call add_json_bool, PresignedPrebuilt,              $(filter PRESIGNED,$(LOCAL_CERTIFICATE)))

  $(call add_json_bool, NoStripping,                    $(filter nostripping,$(LOCAL_DEX_PREOPT)))
  $(call add_json_str,  StripInputPath,                 $$1)
  $(call add_json_str,  StripOutputPath,                $$2)

  $(call json_end)

@@ -244,8 +244,7 @@ ifdef LOCAL_DEX_PREOPT
  $(my_dexpreopt_script): $(my_dexpreopt_config) $(PRODUCT_OUT)/dexpreopt.config
	@echo "$(PRIVATE_MODULE) dexpreopt gen"
	$(DEXPREOPT_GEN) -global $(PRIVATE_GLOBAL_CONFIG) -module $(PRIVATE_MODULE_CONFIG) \
	-dexpreopt_script $@ -strip_script $(PRIVATE_STRIP_SCRIPT) \
	-out_dir $(OUT_DIR)
	-dexpreopt_script $@ -strip_script $(PRIVATE_STRIP_SCRIPT)

  my_dexpreopt_deps := $(my_dex_jar)
  my_dexpreopt_deps += $(if $(my_process_profile),$(LOCAL_DEX_PREOPT_PROFILE))