From 5e05b8ef315dddca2e40ee8b53f1b8392aee174b Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Fri, 27 Nov 2020 10:35:17 +0000 Subject: [PATCH] Add make support for Aml_abis and Ndk_abis options Add a new TARGET_ARCH_SUITE which, when set to 'mainline_sdk' or 'ndk', sets `Aml_abis: true` in soong.variables. This is required to enable removing the custom soong.variables that are being maintained for the ndk and mainline sdk builds. Bug: 174315599 Test: TARGET_ARCH_SUITE=mainline-sdk m nothing; inspect soong.variables (ditto for ndk) Change-Id: Ib651a637457310270840d721cdccf50bede3ee58 --- core/board_config.mk | 4 ++++ core/main.mk | 5 +++++ core/soong_config.mk | 3 +++ 3 files changed, 12 insertions(+) diff --git a/core/board_config.mk b/core/board_config.mk index 2eaba96b85..c5582649a0 100644 --- a/core/board_config.mk +++ b/core/board_config.mk @@ -55,6 +55,10 @@ _board_strip_readonly_list += TARGET_2ND_CPU_ABI _board_strip_readonly_list += TARGET_2ND_CPU_ABI2 _board_strip_readonly_list += TARGET_2ND_CPU_VARIANT _board_strip_readonly_list += TARGET_2ND_CPU_VARIANT_RUNTIME +# TARGET_ARCH_SUITE is an alternative arch configuration to TARGET_ARCH (and related variables), +# that can be used for soong-only builds to build for several architectures at once. +# Allowed values currently are "ndk" and "mainline_sdk". +_board_strip_readonly_list += TARGET_ARCH_SUITE # File system variables _board_strip_readonly_list += BOARD_FLASH_BLOCK_SIZE diff --git a/core/main.mk b/core/main.mk index 3cc36909df..4e55cb441e 100644 --- a/core/main.mk +++ b/core/main.mk @@ -115,6 +115,11 @@ SKIP_BOOT_JARS_CHECK := true endif endif +ifdef TARGET_ARCH_SUITE + # TODO(b/175577370): Enable this error. + # $(error TARGET_ARCH_SUITE is not supported in kati/make builds) +endif + # ADDITIONAL__PROPERTIES are properties that are determined by the # build system itself. Don't let it be defined from outside of the core build # system like Android.mk or .mk files. diff --git a/core/soong_config.mk b/core/soong_config.mk index 61c045213a..9459a5bfd6 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -54,6 +54,9 @@ $(call add_json_str, DeviceSecondaryArchVariant, $(TARGET_2ND_ARCH_VARIA $(call add_json_str, DeviceSecondaryCpuVariant, $(TARGET_2ND_CPU_VARIANT)) $(call add_json_list, DeviceSecondaryAbi, $(TARGET_2ND_CPU_ABI) $(TARGET_2ND_CPU_ABI2)) +$(call add_json_bool, Aml_abis, $(if $(filter mainline_sdk,$(TARGET_ARCH_SUITE)),true)) +$(call add_json_bool, Ndk_abis, $(if $(filter ndk, $(TARGET_ARCH_SUITE)),true)) + $(call add_json_str, NativeBridgeArch, $(TARGET_NATIVE_BRIDGE_ARCH)) $(call add_json_str, NativeBridgeArchVariant, $(TARGET_NATIVE_BRIDGE_ARCH_VARIANT)) $(call add_json_str, NativeBridgeCpuVariant, $(TARGET_NATIVE_BRIDGE_CPU_VARIANT))