Restrict RELEASE_AVF_ENABLE_EARLY_VM flag to only trunk_staging
We should make sure that we don't accidentally enable
RELEASE_AVF_ENABLE_EARLY_VM in -next release configuration before
b/357025924 is fixed.
Since it seems we can't query the value of TARGET_RELEASE, we use
RELEASE_AIDL_USE_UNFROZEN as a proxy (it is set to true in non-next
release configurations)
Bug: 357025924
Test: set RELEASE_AVF_ENABLE_EARLY_VM to true in ap2a release
Test: check that build fails
Change-Id: I83eb1f17c27f63923e0c4102328e71f860af726d
diff --git a/build/apex/product_packages.mk b/build/apex/product_packages.mk
index e710021..efa8dd5 100644
--- a/build/apex/product_packages.mk
+++ b/build/apex/product_packages.mk
@@ -62,3 +62,11 @@
$(error RELEASE_AVF_ENABLE_LLPVM_CHANGES must also be enabled)
endif
endif
+
+ifdef RELEASE_AVF_ENABLE_EARLY_VM
+ # We can't query TARGET_RELEASE from here, so we use RELEASE_AIDL_USE_UNFROZEN as a proxy value of
+ # whether we are building -next release.
+ ifneq ($(RELEASE_AIDL_USE_UNFROZEN),true)
+ $(error RELEASE_AVF_ENABLE_EARLY_VM can only be enabled in trunk_staging until b/357025924 is fixed)
+ endif
+endif