link_type check: Support modules installed into /data

Test: compare build.ninja before/after, look at warnings.html
Change-Id: I1b78748dd80b73d2601b2adf0aaac8a6b2b350d5
This commit is contained in:
Dan Willemsen 2016-09-22 10:56:36 -07:00
parent f7d1a6d75f
commit 3594cee467

View file

@ -3128,18 +3128,27 @@ endef
define link-type-partitions
ifndef LOCAL_IS_HOST_MODULE
ifeq (true,$(LOCAL_PROPRIETARY_MODULE))
ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
ifneq ($(filter $(TARGET_OUT_VENDOR)/%,$(my_module_path)),)
$(1): PRIVATE_LINK_TYPE += partition:vendor
$(1): PRIVATE_WARN_TYPES += partition:data
$(1): PRIVATE_ALLOWED_TYPES += partition:vendor partition:oem partition:odm
else ifeq (true,$(LOCAL_OEM_MODULE))
else ifneq ($(filter $(TARGET_OUT_OEM)/%,$(my_module_path)),)
$(1): PRIVATE_LINK_TYPE += partition:oem
$(1): PRIVATE_WARN_TYPES += partition:data
$(1): PRIVATE_ALLOWED_TYPES += partition:vendor partition:oem partition:odm
else ifeq (true,$(LOCAL_ODM_MODULE))
else ifneq ($(filter $(TARGET_OUT_ODM)/%,$(my_module_path)),)
$(1): PRIVATE_LINK_TYPE += partition:odm
$(1): PRIVATE_WARN_TYPES += partition:data
$(1): PRIVATE_ALLOWED_TYPES += partition:vendor partition:oem partition:odm
else ifneq ($(filter $(TARGET_OUT_DATA)/%,$(my_module_path)),)
$(1): PRIVATE_LINK_TYPE += partition:data
$(1): PRIVATE_ALLOWED_TYPES += partition:data partition:vendor partition:oem partition:odm
else
# TODO: Mark libraries in /data
$(1): PRIVATE_WARN_TYPES += partition:vendor partition:oem partition:odm
$(1): PRIVATE_WARN_TYPES += partition:vendor partition:oem partition:odm partition:data
endif
else # uninstallable module
$(1): PRIVATE_ALLOWED_TYPES += partition:vendor partition:oem partition:odm partition:data
endif
endif
endef