Force PRODUCT_ENABLE_UFFD_GC to true on GSI.
If the kernel version isn't available to the build system and
PRODUCT_ENABLE_UFFD_GC isn't explicitly set, there will be a build
warning. To address the warning and make the behavior more explicit on
GSI builds, we need this change.
Bug: 321751629
Test: lunch aosp_x86_64-trunk_staging-userdebug && m dist
Change-Id: I5b73890235827929ea3bce5a07260d6c67a00a27
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
index 3ef75b3..a581324 100644
--- a/target/product/gsi_release.mk
+++ b/target/product/gsi_release.mk
@@ -91,4 +91,11 @@
# Window Extensions
ifneq ($(PRODUCT_IS_ATV),true)
$(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions.mk)
-endif
\ No newline at end of file
+endif
+
+# A GSI is to be mixed with different boot images. That means we can't determine
+# the kernel version when building a GSI.
+# Assume the device supports UFFD. If it doesn't, the ART runtime will fall back
+# to CC, and odrefresh will regenerate core dexopt artifacts on the first boot,
+# so this is okay.
+PRODUCT_ENABLE_UFFD_GC := true