# and the .mk suffix) of the product makefile, "<product_name>:" can be
# omitted.
+# Search for AndroidProducts.mks in the given dir.
+# $(1): the path to the dir
+define _search-android-products-files-in-dir
+$(sort $(shell test -d $(1) && find -L $(1) \
+ -maxdepth 6 \
+ -name .git -prune \
+ -o -name AndroidProducts.mk -print))
+endef
+
#
# Returns the list of all AndroidProducts.mk files.
# $(call ) isn't necessary.
#
define _find-android-products-files
-$(shell test -d device && find device -maxdepth 6 -name AndroidProducts.mk) \
- $(shell test -d vendor && find vendor -maxdepth 6 -name AndroidProducts.mk) \
+$(foreach d, device vendor product,$(call _search-android-products-files-in-dir,$(d))) \
$(SRC_TARGET_DIR)/product/AndroidProducts.mk
endef
PRODUCT_SUPPORTS_BOOT_SIGNER \
PRODUCT_SUPPORTS_VBOOT \
PRODUCT_SUPPORTS_VERITY \
+ PRODUCT_SUPPORTS_VERITY_FEC \
PRODUCT_OEM_PROPERTIES \
PRODUCT_SYSTEM_PROPERTY_BLACKLIST \
PRODUCT_SYSTEM_SERVER_JARS \
PRODUCT_VBOOT_SIGNING_KEY \
+ PRODUCT_VBOOT_SIGNING_SUBKEY \
PRODUCT_VERITY_SIGNING_KEY \
PRODUCT_SYSTEM_VERITY_PARTITION \
PRODUCT_VENDOR_VERITY_PARTITION \
PRODUCT_DEX_PREOPT_MODULE_CONFIGS \
PRODUCT_DEX_PREOPT_DEFAULT_FLAGS \
PRODUCT_DEX_PREOPT_BOOT_FLAGS \
+ PRODUCT_SANITIZER_MODULE_CONFIGS \
+ PRODUCT_SYSTEM_BASE_FS_PATH \
+ PRODUCT_VENDOR_BASE_FS_PATH \
+ PRODUCT_SHIPPING_API_LEVEL \
+
define dump-product
# 3. Records that we've visited this node, in ALL_PRODUCTS
#
define inherit-product
+ $(if $(findstring ../,$(1)),\
+ $(eval np := $(call normalize-paths,$(1))),\
+ $(eval np := $(strip $(1))))\
$(foreach v,$(_product_var_list), \
- $(eval $(v) := $($(v)) $(INHERIT_TAG)$(strip $(1)))) \
+ $(eval $(v) := $($(v)) $(INHERIT_TAG)$(np))) \
$(eval inherit_var := \
PRODUCTS.$(strip $(word 1,$(_include_stack))).INHERITS_FROM) \
- $(eval $(inherit_var) := $(sort $($(inherit_var)) $(strip $(1)))) \
+ $(eval $(inherit_var) := $(sort $($(inherit_var)) $(np))) \
$(eval inherit_var:=) \
$(eval ALL_PRODUCTS := $(sort $(ALL_PRODUCTS) $(word 1,$(_include_stack))))
endef
TARGET_NO_RECOVERY \
TARGET_NO_RADIOIMAGE \
TARGET_HARDWARE_3D \
- TARGET_PROVIDES_INIT_RC \
TARGET_CPU_ABI \
TARGET_CPU_ABI2 \
_product_stash_var_list += \
GLOBAL_CFLAGS_NO_OVERRIDE \
GLOBAL_CPPFLAGS_NO_OVERRIDE \
+ GLOBAL_CLANG_CFLAGS_NO_OVERRIDE \
#
# Stash values of the variables in _product_stash_var_list.
$(eval PRODUCT_DEX_PREOPT_MODULE_CONFIGS += \
$(foreach m,$(1),$(m)=$(_c)))
endef
+
+# whitespace placeholder when we record module's sanitizer config.
+_PSMC_SP_PLACE_HOLDER := |@SP@|
+# Set up sanitizer config for a module.
+# $(1) list of module names
+# $(2) the modules' sanitizer config
+define add-product-sanitizer-module-config
+$(eval _c := $(subst $(space),$(_PSMC_SP_PLACE_HOLDER),$(strip $(2))))\
+$(eval PRODUCT_SANITIZER_MODULE_CONFIGS += \
+ $(foreach m,$(1),$(m)=$(_c)))
+endef