Android.mk: conditional compilation of odm_sepolicy.cil

Do not attempt to build odm_sepolicy.cil if BOARD_ODM_SEPOLICY_DIRS is
not defined. Attempting to do so will create an empty file, which causes
build problems when
0c6ea1e812
is applied.

Test: "cd system/sepolicy && mma -j55" succeeds
Test: "make checkbuild" succeeds
Change-Id: Iefc458bddff3d08e5fcb86f8be3cad16d7e36e73
This commit is contained in:
Nick Kralevich 2018-09-25 11:03:48 -07:00
parent 6cd9bd078a
commit 1b2ea497aa

View file

@ -581,6 +581,7 @@ vendor_policy.conf :=
#################################
include $(CLEAR_VARS)
ifdef BOARD_ODM_SEPOLICY_DIRS
# odm_policy.cil - the odm sepolicy. This needs attributization and to be combined
# with the platform-provided policy. It makes use of the reqd_policy_mask files from private
# policy and the platform public policy files in order to use checkpolicy.
@ -626,6 +627,7 @@ $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/build_sepolicy \
built_odm_cil := $(LOCAL_BUILT_MODULE)
odm_policy.conf :=
odm_policy_raw :=
endif
#################################
include $(CLEAR_VARS)