blob: 47b4bcfce62a95e2c143ef8f92e09cb7aff51c7b [file] [log] [blame]
Jiakai Zhangd6c6e3a2022-11-16 11:52:00 +00001# ART configuration that has to be determined after product config is resolved.
2#
3# Inputs:
4# PRODUCT_ENABLE_UFFD_GC: See comments in build/make/core/product.mk.
5# OVERRIDE_ENABLE_UFFD_GC: Overrides PRODUCT_ENABLE_UFFD_GC. Can be passed from the commandline for
6# debugging purposes.
7# BOARD_API_LEVEL: See comments in build/make/core/main.mk.
8# BOARD_SHIPPING_API_LEVEL: See comments in build/make/core/main.mk.
9# PRODUCT_SHIPPING_API_LEVEL: See comments in build/make/core/product.mk.
10#
11# Outputs:
12# ENABLE_UFFD_GC: Whether to use userfaultfd GC.
13
14config_enable_uffd_gc := \
Jiakai Zhang53dd8952024-01-18 17:22:13 +000015 $(firstword $(OVERRIDE_ENABLE_UFFD_GC) $(PRODUCT_ENABLE_UFFD_GC) default)
Jiakai Zhangd6c6e3a2022-11-16 11:52:00 +000016
Jiakai Zhang53dd8952024-01-18 17:22:13 +000017ifeq (,$(filter default true false,$(config_enable_uffd_gc)))
Jiakai Zhangd6c6e3a2022-11-16 11:52:00 +000018 $(error Unknown PRODUCT_ENABLE_UFFD_GC value: $(config_enable_uffd_gc))
19endif
20
Jiakai Zhang53dd8952024-01-18 17:22:13 +000021ENABLE_UFFD_GC := $(config_enable_uffd_gc)
22# If the value is "default", it will be mangled by post_process_props.py.
23ADDITIONAL_PRODUCT_PROPERTIES += ro.dalvik.vm.enable_uffd_gc=$(config_enable_uffd_gc)
Alyssa Ketpreechasawatba231d22023-10-26 13:17:31 +000024
25# Create APEX_BOOT_JARS_EXCLUDED which is a list of jars to be removed from
26# ApexBoorJars when built from mainline prebuilts.
27# soong variables indicate whether the prebuilt is enabled:
28# - $(m)_module/source_build for art and TOGGLEABLE_PREBUILT_MODULES
29# - ANDROID/module_build_from_source for other mainline modules
Alyssa Ketpreechasawat74dabed2024-02-29 01:57:07 +000030# Note that RELEASE_APEX_BOOT_JARS_PREBUILT_EXCLUDED_LIST is the list of module names
31# and library names of jars that need to be removed. We have to keep separated list per
32# release config due to possibility of different prebuilt content.
Alyssa Ketpreechasawatba231d22023-10-26 13:17:31 +000033APEX_BOOT_JARS_EXCLUDED :=
Alyssa Ketpreechasawat74dabed2024-02-29 01:57:07 +000034$(foreach pair, $(RELEASE_APEX_BOOT_JARS_PREBUILT_EXCLUDED_LIST),\
Alyssa Ketpreechasawatba231d22023-10-26 13:17:31 +000035 $(eval m := $(subst com.android.,,$(call word-colon,1,$(pair)))) \
36 $(if $(call soong_config_get,$(m)_module,source_build), \
37 $(if $(filter true,$(call soong_config_get,$(m)_module,source_build)),, \
38 $(eval APEX_BOOT_JARS_EXCLUDED += $(pair))), \
39 $(if $(filter true,$(call soong_config_get,ANDROID,module_build_from_source)),, \
40 $(eval APEX_BOOT_JARS_EXCLUDED += $(pair)))))