Jiakai Zhang | d6c6e3a | 2022-11-16 11:52:00 +0000 | [diff] [blame] | 1 | # 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 | |
| 14 | config_enable_uffd_gc := \ |
Jiakai Zhang | 53dd895 | 2024-01-18 17:22:13 +0000 | [diff] [blame] | 15 | $(firstword $(OVERRIDE_ENABLE_UFFD_GC) $(PRODUCT_ENABLE_UFFD_GC) default) |
Jiakai Zhang | d6c6e3a | 2022-11-16 11:52:00 +0000 | [diff] [blame] | 16 | |
Jiakai Zhang | 53dd895 | 2024-01-18 17:22:13 +0000 | [diff] [blame] | 17 | ifeq (,$(filter default true false,$(config_enable_uffd_gc))) |
Jiakai Zhang | d6c6e3a | 2022-11-16 11:52:00 +0000 | [diff] [blame] | 18 | $(error Unknown PRODUCT_ENABLE_UFFD_GC value: $(config_enable_uffd_gc)) |
| 19 | endif |
| 20 | |
Jiakai Zhang | 53dd895 | 2024-01-18 17:22:13 +0000 | [diff] [blame] | 21 | ENABLE_UFFD_GC := $(config_enable_uffd_gc) |
| 22 | # If the value is "default", it will be mangled by post_process_props.py. |
| 23 | ADDITIONAL_PRODUCT_PROPERTIES += ro.dalvik.vm.enable_uffd_gc=$(config_enable_uffd_gc) |
Alyssa Ketpreechasawat | ba231d2 | 2023-10-26 13:17:31 +0000 | [diff] [blame] | 24 | |
| 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 Ketpreechasawat | 74dabed | 2024-02-29 01:57:07 +0000 | [diff] [blame^] | 30 | # 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 Ketpreechasawat | ba231d2 | 2023-10-26 13:17:31 +0000 | [diff] [blame] | 33 | APEX_BOOT_JARS_EXCLUDED := |
Alyssa Ketpreechasawat | 74dabed | 2024-02-29 01:57:07 +0000 | [diff] [blame^] | 34 | $(foreach pair, $(RELEASE_APEX_BOOT_JARS_PREBUILT_EXCLUDED_LIST),\ |
Alyssa Ketpreechasawat | ba231d2 | 2023-10-26 13:17:31 +0000 | [diff] [blame] | 35 | $(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))))) |