matrix: ENFORCE_NO_UNUSED_HALS

Enforce that all hals in the device manifest are
in framework compatibility matrix -- at build time.

Bug: 65028233
Test: build a phone without DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX.
Change-Id: Ibf220f80ca3621ddbf8288d372d5f40336e45248
This commit is contained in:
Yifan Hong
2018-03-28 10:27:10 -07:00
parent 3693fe4ab5
commit 7d61a8d47b

View File

@@ -127,6 +127,14 @@ endif
LOCAL_ASSEMBLE_VINTF_ENV_VARS := PRODUCT_ENFORCE_VINTF_MANIFEST
# TODO(b/65028233): Enforce no "unused HALs" for devices that does not define
# DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE as well
ifeq (true,$(strip $(PRODUCT_ENFORCE_VINTF_MANIFEST)))
ifdef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE := VINTF_ENFORCE_NO_UNUSED_HALS=true
endif
endif
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
BUILT_SYSTEM_COMPATIBILITY_MATRIX := $(LOCAL_BUILT_MODULE)