From cddea9b426ecdc9360fd0e6c7b9b1edd3c877672 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 5 Jan 2021 20:51:40 +0900 Subject: [PATCH] Add TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION The APEX symlink optimization is a build-time trick to save the storage/RAM usage of APEX by replacing some files in APEX with symlinks to the files in the system partition. The optimization however is automatically turned off for 'updatable: true' APEXes because doing the optimization for them will hide the sys-health implication until when the APEXes are built unbundled (i.e. prebuilt) and thus the optimization is impossible. TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION forcibly disables the safety net. When it is set to true, the symlink optimization is done regardless of the 'updatable' property. This is useful for some of the devices like Go where most APEXes (even the 'updatable: true' ones) should be effectively non-updatable. Bug: 175630508 Test: TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION=true m and check that updatable APEXes have symlinks to system libs Change-Id: I261fd4ab2dd8e62ff435306b11168121cbcf662a --- core/soong_config.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/core/soong_config.mk b/core/soong_config.mk index ae494c4ff1..1d252b7495 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -180,6 +180,7 @@ $(call add_json_list, SystemExtPrivateSepolicyDirs, $(SYSTEM_EXT_PRIVATE_SE $(call add_json_list, BoardSepolicyM4Defs, $(BOARD_SEPOLICY_M4DEFS)) $(call add_json_bool, Flatten_apex, $(filter true,$(TARGET_FLATTEN_APEX))) +$(call add_json_bool, ForceApexSymlinkOptimization, $(filter true,$(TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION))) $(call add_json_str, DexpreoptGlobalConfig, $(DEX_PREOPT_CONFIG))