Build modules from source for module products.
This overrides the branch default (BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE) if it is set to use prebuilts. Test: build/soong/soong_ui.bash --dumpvar-mode MODULE_BUILD_FROM_SOURCE returns false with BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE:=false in internal Test: env TARGET_PRODUCT=module_arm64 \ build/soong/soong_ui.bash --dumpvar-mode MODULE_BUILD_FROM_SOURCE returns true with BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE:=false in internal Test: env TARGET_PRODUCT=mainline_modules_x86 \ build/soong/soong_ui.bash --dumpvar-mode MODULE_BUILD_FROM_SOURCE returns true with BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE:=false in internal Test: env TARGET_PRODUCT=redfin \ build/soong/soong_ui.bash --dumpvar-mode MODULE_BUILD_FROM_SOURCE returns false with BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE:=false in internal Bug: 222723757 Change-Id: I0faea006b0e95eff40bbfbe00cc74ba5985beeba
This commit is contained in:
parent
fa92dd5f32
commit
47dcbeaefb
3 changed files with 11 additions and 7 deletions
|
@ -52,9 +52,9 @@ else ifeq (,$(filter sdk win_sdk sdk_addon,$(MAKECMDGOALS))$(findstring com.goog
|
||||||
# However, sdk/win_sdk/sdk_addon builds might not include com.google.android.xxx
|
# However, sdk/win_sdk/sdk_addon builds might not include com.google.android.xxx
|
||||||
# packages, so for those we respect the default behavior.
|
# packages, so for those we respect the default behavior.
|
||||||
MODULE_BUILD_FROM_SOURCE := true
|
MODULE_BUILD_FROM_SOURCE := true
|
||||||
else ifeq (,$(filter-out modules_% mainline_modules_%,$(TARGET_PRODUCT)))
|
else ifneq (,$(PRODUCT_MODULE_BUILD_FROM_SOURCE))
|
||||||
# Always build from source in unbundled builds using the module targets.
|
# Let products override the branch default.
|
||||||
MODULE_BUILD_FROM_SOURCE := true
|
MODULE_BUILD_FROM_SOURCE := $(PRODUCT_MODULE_BUILD_FROM_SOURCE)
|
||||||
else
|
else
|
||||||
MODULE_BUILD_FROM_SOURCE := $(BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE)
|
MODULE_BUILD_FROM_SOURCE := $(BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE)
|
||||||
endif
|
endif
|
||||||
|
@ -64,10 +64,6 @@ ifneq (,$(ART_MODULE_BUILD_FROM_SOURCE))
|
||||||
else ifneq (,$(findstring .android.art,$(TARGET_BUILD_APPS)))
|
else ifneq (,$(findstring .android.art,$(TARGET_BUILD_APPS)))
|
||||||
# Build ART modules from source if they are listed in TARGET_BUILD_APPS.
|
# Build ART modules from source if they are listed in TARGET_BUILD_APPS.
|
||||||
ART_MODULE_BUILD_FROM_SOURCE := true
|
ART_MODULE_BUILD_FROM_SOURCE := true
|
||||||
else ifeq (,$(filter-out modules_% mainline_modules_%,$(TARGET_PRODUCT)))
|
|
||||||
# Always build from source for the module targets. This ought to be covered by
|
|
||||||
# the TARGET_BUILD_APPS check above, but there are test builds that don't set it.
|
|
||||||
ART_MODULE_BUILD_FROM_SOURCE := true
|
|
||||||
else
|
else
|
||||||
# Do the same as other modules by default.
|
# Do the same as other modules by default.
|
||||||
ART_MODULE_BUILD_FROM_SOURCE := $(MODULE_BUILD_FROM_SOURCE)
|
ART_MODULE_BUILD_FROM_SOURCE := $(MODULE_BUILD_FROM_SOURCE)
|
||||||
|
|
|
@ -370,6 +370,10 @@ _product_single_value_vars += PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT
|
||||||
# "/system/framework/foo.jar" will be "system/framework/foo.jar.fsv_meta".
|
# "/system/framework/foo.jar" will be "system/framework/foo.jar.fsv_meta".
|
||||||
_product_single_value_vars += PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA
|
_product_single_value_vars += PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA
|
||||||
|
|
||||||
|
# If true, sets the default for MODULE_BUILD_FROM_SOURCE. This overrides
|
||||||
|
# BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE but not an explicitly set value.
|
||||||
|
_product_single_value_vars += PRODUCT_MODULE_BUILD_FROM_SOURCE
|
||||||
|
|
||||||
.KATI_READONLY := _product_single_value_vars _product_list_vars
|
.KATI_READONLY := _product_single_value_vars _product_list_vars
|
||||||
_product_var_list :=$= $(_product_single_value_vars) $(_product_list_vars)
|
_product_var_list :=$= $(_product_single_value_vars) $(_product_list_vars)
|
||||||
|
|
||||||
|
|
|
@ -21,3 +21,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/cfi-common.mk)
|
||||||
# Enables treble, which enabled certain -D compilation flags. In particular, libhidlbase
|
# Enables treble, which enabled certain -D compilation flags. In particular, libhidlbase
|
||||||
# uses -DENFORCE_VINTF_MANIFEST. See b/185759877
|
# uses -DENFORCE_VINTF_MANIFEST. See b/185759877
|
||||||
PRODUCT_SHIPPING_API_LEVEL := 29
|
PRODUCT_SHIPPING_API_LEVEL := 29
|
||||||
|
|
||||||
|
# Builds using a module product should build modules from source, even if
|
||||||
|
# BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE says otherwise.
|
||||||
|
PRODUCT_MODULE_BUILD_FROM_SOURCE := true
|
||||||
|
|
Loading…
Reference in a new issue