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

Commit 772c6de6 authored by Anton Hansson's avatar Anton Hansson Committed by Automerger Merge Worker
Browse files

Merge "Make TARGET_ARCH optional in BoardConfig" am: ed3b56eb

Original change: https://android-review.googlesource.com/c/platform/build/+/1512776

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I65ab3b66edd60c0451ceff39067c04f49fd52ef8
parents 3c22ddff ed3b56eb
Loading
Loading
Loading
Loading
+18 −9
Original line number Original line Diff line number Diff line
@@ -174,10 +174,19 @@ else
  TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
  TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
  .KATI_READONLY := TARGET_DEVICE_DIR
  .KATI_READONLY := TARGET_DEVICE_DIR
endif
endif

include $(board_config_mk)
include $(board_config_mk)
ifeq ($(TARGET_ARCH),)

  $(error TARGET_ARCH not defined by board config: $(board_config_mk))
ifneq (,$(and $(TARGET_ARCH),$(TARGET_ARCH_SUITE)))
  $(error $(board_config_mk) erroneously sets both TARGET_ARCH and TARGET_ARCH_SUITE)
endif
ifeq ($(TARGET_ARCH)$(TARGET_ARCH_SUITE),)
  $(error Target architectures not defined by board config: $(board_config_mk))
endif
ifeq ($(TARGET_CPU_ABI)$(TARGET_ARCH_SUITE),)
  $(error TARGET_CPU_ABI not defined by board config: $(board_config_mk))
endif
endif

ifneq ($(MALLOC_IMPL),)
ifneq ($(MALLOC_IMPL),)
  $(warning *** Unsupported option MALLOC_IMPL defined by board config: $(board_config_mk).)
  $(warning *** Unsupported option MALLOC_IMPL defined by board config: $(board_config_mk).)
  $(error Use `MALLOC_SVELTE := true` to configure jemalloc for low-memory)
  $(error Use `MALLOC_SVELTE := true` to configure jemalloc for low-memory)
@@ -194,10 +203,12 @@ $(foreach var,$(_board_true_false_vars), \
TARGET_CPU_VARIANT_RUNTIME := $(or $(TARGET_CPU_VARIANT_RUNTIME),$(TARGET_CPU_VARIANT))
TARGET_CPU_VARIANT_RUNTIME := $(or $(TARGET_CPU_VARIANT_RUNTIME),$(TARGET_CPU_VARIANT))
TARGET_2ND_CPU_VARIANT_RUNTIME := $(or $(TARGET_2ND_CPU_VARIANT_RUNTIME),$(TARGET_2ND_CPU_VARIANT))
TARGET_2ND_CPU_VARIANT_RUNTIME := $(or $(TARGET_2ND_CPU_VARIANT_RUNTIME),$(TARGET_2ND_CPU_VARIANT))


ifdef TARGET_ARCH
  # The combo makefiles check and set defaults for various CPU configuration
  # The combo makefiles check and set defaults for various CPU configuration
  combo_target := TARGET_
  combo_target := TARGET_
  combo_2nd_arch_prefix :=
  combo_2nd_arch_prefix :=
  include $(BUILD_SYSTEM)/combo/select.mk
  include $(BUILD_SYSTEM)/combo/select.mk
endif


ifdef TARGET_2ND_ARCH
ifdef TARGET_2ND_ARCH
  combo_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
  combo_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
@@ -207,9 +218,7 @@ endif
.KATI_READONLY := $(_board_strip_readonly_list)
.KATI_READONLY := $(_board_strip_readonly_list)


INTERNAL_KERNEL_CMDLINE := $(BOARD_KERNEL_CMDLINE)
INTERNAL_KERNEL_CMDLINE := $(BOARD_KERNEL_CMDLINE)
ifeq ($(TARGET_CPU_ABI),)

  $(error No TARGET_CPU_ABI defined by board config: $(board_config_mk))
endif
ifneq ($(filter %64,$(TARGET_ARCH)),)
ifneq ($(filter %64,$(TARGET_ARCH)),)
  TARGET_IS_64_BIT := true
  TARGET_IS_64_BIT := true
endif
endif
+2 −0
Original line number Original line Diff line number Diff line
@@ -108,6 +108,7 @@ ifeq ($(WRITE_SOONG_VARIABLES),true)
  $(call add_json_str,  Dex2oatXms,                              $(DEX2OAT_XMS))
  $(call add_json_str,  Dex2oatXms,                              $(DEX2OAT_XMS))
  $(call add_json_str,  EmptyDirectory,                          $(OUT_DIR)/empty)
  $(call add_json_str,  EmptyDirectory,                          $(OUT_DIR)/empty)


ifdef TARGET_ARCH
  $(call add_json_map,  CpuVariant)
  $(call add_json_map,  CpuVariant)
  $(call add_json_str,  $(TARGET_ARCH), $(DEX2OAT_TARGET_CPU_VARIANT))
  $(call add_json_str,  $(TARGET_ARCH), $(DEX2OAT_TARGET_CPU_VARIANT))
  ifdef TARGET_2ND_ARCH
  ifdef TARGET_2ND_ARCH
@@ -121,6 +122,7 @@ ifeq ($(WRITE_SOONG_VARIABLES),true)
    $(call add_json_str, $(TARGET_2ND_ARCH), $($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES))
    $(call add_json_str, $(TARGET_2ND_ARCH), $($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES))
  endif
  endif
  $(call end_json_map)
  $(call end_json_map)
endif


  $(call add_json_str,  DirtyImageObjects,                  $(DIRTY_IMAGE_OBJECTS))
  $(call add_json_str,  DirtyImageObjects,                  $(DIRTY_IMAGE_OBJECTS))
  $(call add_json_list, BootImageProfiles,                  $(PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION))
  $(call add_json_list, BootImageProfiles,                  $(PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION))