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

Commit 7cd7bd65 authored by Colin Cross's avatar Colin Cross Committed by Gerrit Code Review
Browse files

Merge topic 'arm64'

* changes:
  HACK: add 64-bit directory blacklist
  add support for module supported or unsupported target architectures
parents cd958154 02e31d24
Loading
Loading
Loading
Loading
+53 −0
Original line number Diff line number Diff line
ifneq ($(TARGET_2ND_ARCH),)

# JNI - needs 64-bit VM
_64_bit_directory_blacklist += \
	external/conscrypt \
	external/neven \
	external/svox \
	libcore \
	packages \

# Chromium/V8: needs 64-bit support
_64_bit_directory_blacklist += \
	external/chromium \
	external/chromium-libpac \
	external/chromium_org \
	external/skia \
	external/v8 \
	frameworks/webview \

# misc build errors
_64_bit_directory_blacklist += \
	external/bluetooth/bluedroid \
	external/oprofile/opcontrol \
	external/tcpdump \
	frameworks/av \
	frameworks/base \
	frameworks/ex \
	frameworks/ml \
	frameworks/opt \
	frameworks/wilhelm \
	device/generic/goldfish/opengl \
	device/generic/goldfish/camera \

# depends on libnl_2
_64_bit_directory_blacklist += \
	external/android-clat \
	external/wpa_suplicant_8

# depends on frameworks/av
_64_bit_directory_blacklist += \
	external/srec \
	hardware/libhardware_legacy/audio \
	hardware/libhardware/modules/audio_remote_submix \

_64_bit_directory_blacklist_pattern := $(addsuffix %,$(_64_bit_directory_blacklist))

define directory_is_64_bit_blacklisted
$(if $(filter $(_64_bit_directory_blacklist_pattern),$(1)),true)
endef
else
define directory_is_64_bit_blacklisted
endef
endif
+4 −0
Original line number Diff line number Diff line
@@ -644,6 +644,10 @@ ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY)))

INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img

# HACK: clear LOCAL_PATH from including last build target before calling
# intermedites-dir-for
LOCAL_PATH := $(call my-dir)

recovery_initrc := $(call include-path-for, recovery)/etc/init.rc
recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system
recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img
+4 −0
Original line number Diff line number Diff line
@@ -145,6 +145,10 @@ LOCAL_NO_SYNTAX_CHECK:=
LOCAL_NO_STATIC_ANALYZER:=
LOCAL_32_BIT_ONLY:= # '',true
LOCAL_NO_2ND_ARCH:= # '',true
LOCAL_MODULE_TARGET_ARCH:=
LOCAL_MODULE_TARGET_ARCH_WARN:=
LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH:=
LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH_WARN:=

# arch specific variables
LOCAL_SRC_FILES_$(TARGET_ARCH):=
+5 −3
Original line number Diff line number Diff line
@@ -450,11 +450,13 @@ $(strip \
    $(if $(_idfName),, \
        $(error $(LOCAL_PATH): Name not defined in call to intermediates-dir-for)) \
    $(eval _idfPrefix := $(if $(strip $(3)),HOST,TARGET)) \
    $(eval _idf2ndArchPrefix := $(if $(strip $(5)),$(TARGET_2ND_ARCH_VAR_PREFIX))) \
    $(eval _idf2ndArchPrefix := $(if $(call directory_is_64_bit_blacklisted,$(LOCAL_PATH))$(strip $(5)),$(TARGET_2ND_ARCH_VAR_PREFIX))) \
    $(if $(filter $(_idfPrefix)-$(_idfClass),$(COMMON_MODULE_CLASSES))$(4), \
        $(eval _idfIntBase := $($(_idfPrefix)_OUT_COMMON_INTERMEDIATES)) \
      , \
      ,$(if $(filter $(_idfPrefix)-$(_idfClass),TARGET-SHARED_LIBRARIES TARGET-STATIC_LIBRARIES TARGET-EXECUTABLES),\
          $(eval _idfIntBase := $($(_idf2ndArchPrefix)$(_idfPrefix)_OUT_INTERMEDIATES)) \
       ,$(eval _idfIntBase := $($(_idfPrefix)_OUT_INTERMEDIATES)) \
       ) \
     ) \
    $(_idfIntBase)/$(_idfClass)/$(_idfName)_intermediates \
)
+16 −5
Original line number Diff line number Diff line
@@ -9,13 +9,24 @@ LOCAL_32_BIT_ONLY := true
endif
endif

ifeq ($(TARGET_IS_64_BIT)|$(LOCAL_32_BIT_ONLY),true|true)
LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true

# check if primary arch is supported
include $(BUILD_SYSTEM)/module_arch_supported.mk
ifeq ($(my_module_arch_supported),true)
# primary arch is supported
include $(BUILD_SYSTEM)/executable_internal.mk
else ifneq (,$(TARGET_2ND_ARCH))
# check if secondary arch is supported
LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
else
LOCAL_2ND_ARCH_VAR_PREFIX :=
include $(BUILD_SYSTEM)/module_arch_supported.mk
ifeq ($(my_module_arch_supported),true)
# secondary arch is supported
include $(BUILD_SYSTEM)/executable_internal.mk
endif
endif # TARGET_2ND_ARCH

LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true
include $(BUILD_SYSTEM)/executable_internal.mk
LOCAL_2ND_ARCH_VAR_PREFIX :=
LOCAL_NO_2ND_ARCH_MODULE_SUFFIX :=

my_module_arch_supported :=
Loading