Fix build part 2. Always create platform_mapping_file.
commit 552fb537129e9b446e79af53216c08d15e69144e fixed an undefined
module error by removing the module when not defined (on non-treble
devices), but the sepolicy build on non-treble devices was changed
to rely on the split treble files, even though the split is not used.
Change this so that the file is always present, to allow policy
compilation.
Test: policy fully builds.
Change-Id: Ia0934c739336cea54228bbff8d6644aa3ae501e5
diff --git a/Android.mk b/Android.mk
index 0cd642c..7c75f9d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -95,6 +95,9 @@
BOARD_SEPOLICY_VERS := $(PLATFORM_SEPOLICY_VERSION)
endif
+
+platform_mapping_file := $(BOARD_SEPOLICY_VERS).cil
+
###########################################################
# Compute policy files to be used in policy build.
# $(1): files to include
@@ -166,8 +169,6 @@
# inside init/init.cpp for loading SELinux policy from files.
ifeq ($(PRODUCT_FULL_TREBLE),true)
-platform_mapping_file := $(BOARD_SEPOLICY_VERS).cil
-
# Use split SELinux policy
LOCAL_REQUIRED_MODULES += \
$(platform_mapping_file) \
@@ -343,7 +344,6 @@
echo $(PRIVATE_PLAT_SEPOL_VERS) > $@
#################################
-ifeq ($(PRODUCT_FULL_TREBLE),true)
include $(CLEAR_VARS)
LOCAL_MODULE := $(platform_mapping_file)
@@ -377,7 +377,6 @@
built_mapping_cil := $(LOCAL_BUILT_MODULE)
current_mapping.cil :=
-endif # ifeq ($(PRODUCT_FULL_TREBLE),true)
#################################
include $(CLEAR_VARS)