From 421990d4a4e8b35513f40f901eb1a3b69a752c87 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Tue, 25 May 2021 00:24:51 +0100 Subject: [PATCH] Move logic to disable flattening in unbundled app mode from Soong to make. Avoids TARGET_FLATTEN_APEX lying about it, so we can trust it in scripts, e.g. in art/build/apex/runtests.sh. Test: banchan com.android.art; art/build/apex/runtests.sh Bug: 179900989 Change-Id: I5d3226047e51a51ee76de2cbfad050e200568655 --- core/board_config.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/board_config.mk b/core/board_config.mk index 9061342b87..0936234e48 100644 --- a/core/board_config.mk +++ b/core/board_config.mk @@ -764,8 +764,8 @@ ifeq ($(PRODUCT_ENFORCE_INTER_PARTITION_JAVA_SDK_LIBRARY),true) endif ########################################### -# APEXes are by default flattened, i.e. non-updatable. -# It can be unflattened (and updatable) by inheriting from +# APEXes are by default flattened, i.e. non-updatable, if not building unbundled +# apps. It can be unflattened (and updatable) by inheriting from # updatable_apex.mk # # APEX flattening can also be forcibly enabled (resp. disabled) by @@ -774,7 +774,7 @@ endif ifdef OVERRIDE_TARGET_FLATTEN_APEX TARGET_FLATTEN_APEX := $(OVERRIDE_TARGET_FLATTEN_APEX) else - ifeq (,$(TARGET_FLATTEN_APEX)) + ifeq (,$(TARGET_BUILD_APPS)$(TARGET_FLATTEN_APEX)) TARGET_FLATTEN_APEX := true endif endif