Add selinux_policy_system_soong phony module

selinux_policy_system is in Android.mk. selinux_policy_system_soong is a
phony module in Android.bp for Soong built system images.

Bug: 329208946
Test: m aosp_cf_system_x86_64
Change-Id: If101155c5a706925d52593bab648b878b075f7f2
This commit is contained in:
Inseob Kim 2024-04-12 10:53:34 +09:00
parent ff2018fa84
commit 151562f645

View file

@ -88,6 +88,45 @@ se_build_files {
srcs: ["technical_debt.cil"],
}
soong_config_module_type {
name: "se_phony",
module_type: "phony",
config_namespace: "ANDROID",
bool_variables: ["PRODUCT_PRECOMPILED_SEPOLICY"],
list_variables: ["PLATFORM_SEPOLICY_COMPAT_VERSIONS"],
properties: ["required"],
}
se_phony {
// Currently used only for aosp_cf_system_x86_64
// TODO(b/329208946): migrate selinux_policy_system to Soong
name: "selinux_policy_system_soong",
required: [
"plat_bug_map",
"plat_file_contexts",
"plat_hwservice_contexts",
"plat_keystore2_key_contexts",
"plat_mac_permissions.xml",
"plat_mapping_file",
"plat_property_contexts",
"plat_seapp_contexts",
"plat_sepolicy.cil",
"plat_service_contexts",
"secilc",
],
soong_config_variables: {
PLATFORM_SEPOLICY_COMPAT_VERSIONS: {
required: [
"plat_%s.cil",
"%s.compat.cil",
],
},
PRODUCT_PRECOMPILED_SEPOLICY: {
required: ["plat_sepolicy_and_mapping.sha256"],
},
},
}
reqd_mask_policy = [":se_build_files{.reqd_mask}"]
plat_public_policy = [":se_build_files{.plat_public}"]
plat_private_policy = [":se_build_files{.plat_private}"]