Link RELEASE_AVF_ENABLE_MULTI_TENANT_MICRODROID_VM to payload_not_root
Add plumbing in soong to conditionally enable payload_not_root rust cfg
if RELEASE_AVF_ENABLE_MULTI_TENANT_MICRODROID_VM build flag is set to true.
This patch also showcases how one can conditionally add files to
microdroid system image depending on the value of the build flag
Bug: 298008232
Test: build virt APEX with flag enabled
Test: verified payload runs as system_payload
Change-Id: I7e29b60a329ed4d7d8492bbe01b04ad4f895ff15
diff --git a/libs/microdroid_uids/Android.bp b/libs/microdroid_uids/Android.bp
index 497948d..ce62217 100644
--- a/libs/microdroid_uids/Android.bp
+++ b/libs/microdroid_uids/Android.bp
@@ -7,8 +7,7 @@
crate_name: "microdroid_uids",
srcs: ["src/lib.rs"],
edition: "2021",
- // TODO(b/296393106): Figure out how/when to enable this
- // cfgs: ["payload_not_root"],
+ defaults: ["avf_build_flags_rust"],
apex_available: [
"com.android.virt",
],