Merge "Build modules from source by default." am: ec63efddf9
Original change: https://android-review.googlesource.com/c/platform/build/+/1998880 Change-Id: I367438214a7649cade2396b48ed3efb14b564075
This commit is contained in:
@@ -36,17 +36,27 @@ $(call add_soong_config_var,ANDROID,BOARD_USES_RECOVERY_AS_BOOT)
|
|||||||
$(call add_soong_config_var,ANDROID,BOARD_BUILD_SYSTEM_ROOT_IMAGE)
|
$(call add_soong_config_var,ANDROID,BOARD_BUILD_SYSTEM_ROOT_IMAGE)
|
||||||
$(call add_soong_config_var,ANDROID,PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT)
|
$(call add_soong_config_var,ANDROID,PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT)
|
||||||
|
|
||||||
ifneq (,$(filter sdk win_sdk sdk_addon,$(MAKECMDGOALS)))
|
# Default behavior for the tree wrt building modules or using prebuilts. This
|
||||||
# The artifacts in the SDK zip are OK to build with prebuilt stubs enabled,
|
# can always be overridden by setting the environment variable
|
||||||
# even if prebuilt apexes are not enabled, because the system images in the
|
# MODULE_BUILD_FROM_SOURCE.
|
||||||
# SDK stub are not currently used (and will be removed: b/205008975).
|
BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE := true
|
||||||
MODULE_BUILD_FROM_SOURCE ?= false
|
|
||||||
else ifeq (,$(findstring com.google.android.conscrypt,$(PRODUCT_PACKAGES)))
|
ifneq (,$(MODULE_BUILD_FROM_SOURCE))
|
||||||
|
# Keep an explicit setting.
|
||||||
|
else ifeq (,$(filter sdk win_sdk sdk_addon,$(MAKECMDGOALS))$(findstring com.google.android.conscrypt,$(PRODUCT_PACKAGES)))
|
||||||
# Prebuilt module SDKs require prebuilt modules to work, and currently
|
# Prebuilt module SDKs require prebuilt modules to work, and currently
|
||||||
# prebuilt modules are only provided for com.google.android.xxx. If we can't
|
# prebuilt modules are only provided for com.google.android.xxx. If we can't
|
||||||
# find one of them in PRODUCT_PACKAGES then assume com.android.xxx are in use,
|
# find one of them in PRODUCT_PACKAGES then assume com.android.xxx are in use,
|
||||||
# and disable prebuilt SDKs. In particular this applies to AOSP builds.
|
# and disable prebuilt SDKs. In particular this applies to AOSP builds.
|
||||||
|
#
|
||||||
|
# However, sdk/win_sdk/sdk_addon builds might not include com.google.android.xxx
|
||||||
|
# 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)))
|
||||||
|
# Always build from source in unbundled builds using the module targets.
|
||||||
|
MODULE_BUILD_FROM_SOURCE := true
|
||||||
|
else
|
||||||
|
MODULE_BUILD_FROM_SOURCE := $(BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# TODO(b/220940864): Remove when build scripts have been changed to use
|
# TODO(b/220940864): Remove when build scripts have been changed to use
|
||||||
|
Reference in New Issue
Block a user