Introduce TARGET_BUILD_UNBUNDLED.
Setting this flag enables unbundled building, i.e. without support for building the system image and other platform targets. This functionality was previously enabled by TARGET_BUILD_APPS, and setting that still implies TARGET_BUILD_UNBUNDLED. This helps unbundled builds that aren't apps, e.g. ART runtest builds. Specifically, with the topic of the child CL https://r.android.com/1324517 TARGET_BUILD_UNBUNDLED does not imply disabling dexpreopting, unlike TARGET_BUILD_APPS. TODO: There may still be app-specific conditions that are incorrectly controlled by TARGET_BUILD_UNBUNDLED, in particular on the Soong side through config.UnbundledBuild(). Test: Flash & boot Test: TH, in particular builds green on ub-launcher3-master Bug: 157549171 Change-Id: Ic09fc879117ee06cab5444edfc280ed2b52d2870
This commit is contained in:
@@ -130,7 +130,7 @@ $(file >$(PRODUCT_OUT)/.copied_headers_list,$(TARGET_OUT_HEADERS) $(ALL_COPIED_H
|
|||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# docs/index.html
|
# docs/index.html
|
||||||
ifeq (,$(TARGET_BUILD_APPS))
|
ifeq (,$(TARGET_BUILD_UNBUNDLED))
|
||||||
gen := $(OUT_DOCS)/index.html
|
gen := $(OUT_DOCS)/index.html
|
||||||
ALL_DOCS += $(gen)
|
ALL_DOCS += $(gen)
|
||||||
$(gen): frameworks/base/docs/docs-redirect-index.html
|
$(gen): frameworks/base/docs/docs-redirect-index.html
|
||||||
@@ -3306,7 +3306,7 @@ endif # BOARD_AVB_ENABLE
|
|||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# Check VINTF of build
|
# Check VINTF of build
|
||||||
|
|
||||||
ifndef TARGET_BUILD_APPS
|
ifeq (,$(TARGET_BUILD_UNBUNDLED))
|
||||||
intermediates := $(call intermediates-dir-for,PACKAGING,check_vintf_all)
|
intermediates := $(call intermediates-dir-for,PACKAGING,check_vintf_all)
|
||||||
check_vintf_all_deps :=
|
check_vintf_all_deps :=
|
||||||
|
|
||||||
@@ -3512,13 +3512,12 @@ check_vintf_has_system :=
|
|||||||
check_vintf_common_srcs :=
|
check_vintf_common_srcs :=
|
||||||
check_vintf_all_deps :=
|
check_vintf_all_deps :=
|
||||||
intermediates :=
|
intermediates :=
|
||||||
endif # !TARGET_BUILD_APPS
|
endif # !TARGET_BUILD_UNBUNDLED
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# Check image sizes <= size of super partition
|
# Check image sizes <= size of super partition
|
||||||
|
|
||||||
ifeq (,$(TARGET_BUILD_APPS))
|
ifeq (,$(TARGET_BUILD_UNBUNDLED))
|
||||||
# Do not check for apps-only build
|
|
||||||
|
|
||||||
ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION))
|
ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION))
|
||||||
|
|
||||||
@@ -3554,7 +3553,7 @@ check-all-partition-sizes-nodeps:
|
|||||||
|
|
||||||
endif # PRODUCT_BUILD_SUPER_PARTITION
|
endif # PRODUCT_BUILD_SUPER_PARTITION
|
||||||
|
|
||||||
endif # TARGET_BUILD_APPS
|
endif # !TARGET_BUILD_UNBUNDLED
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# bring in the installer image generation defines if necessary
|
# bring in the installer image generation defines if necessary
|
||||||
@@ -4481,7 +4480,7 @@ endif # build_ota_package
|
|||||||
# A zip of the appcompat directory containing logs
|
# A zip of the appcompat directory containing logs
|
||||||
APPCOMPAT_ZIP := $(PRODUCT_OUT)/appcompat.zip
|
APPCOMPAT_ZIP := $(PRODUCT_OUT)/appcompat.zip
|
||||||
# For apps_only build we'll establish the dependency later in build/make/core/main.mk.
|
# For apps_only build we'll establish the dependency later in build/make/core/main.mk.
|
||||||
ifndef TARGET_BUILD_APPS
|
ifeq (,$(TARGET_BUILD_UNBUNDLED))
|
||||||
$(APPCOMPAT_ZIP): $(INSTALLED_SYSTEMIMAGE_TARGET) \
|
$(APPCOMPAT_ZIP): $(INSTALLED_SYSTEMIMAGE_TARGET) \
|
||||||
$(INSTALLED_RAMDISK_TARGET) \
|
$(INSTALLED_RAMDISK_TARGET) \
|
||||||
$(INSTALLED_BOOTIMAGE_TARGET) \
|
$(INSTALLED_BOOTIMAGE_TARGET) \
|
||||||
@@ -4510,7 +4509,7 @@ name := $(name)-symbols-$(FILE_NAME_TAG)
|
|||||||
|
|
||||||
SYMBOLS_ZIP := $(PRODUCT_OUT)/$(name).zip
|
SYMBOLS_ZIP := $(PRODUCT_OUT)/$(name).zip
|
||||||
# For apps_only build we'll establish the dependency later in build/make/core/main.mk.
|
# For apps_only build we'll establish the dependency later in build/make/core/main.mk.
|
||||||
ifndef TARGET_BUILD_APPS
|
ifeq (,$(TARGET_BUILD_UNBUNDLED))
|
||||||
$(SYMBOLS_ZIP): $(INSTALLED_SYSTEMIMAGE_TARGET) \
|
$(SYMBOLS_ZIP): $(INSTALLED_SYSTEMIMAGE_TARGET) \
|
||||||
$(INSTALLED_RAMDISK_TARGET) \
|
$(INSTALLED_RAMDISK_TARGET) \
|
||||||
$(INSTALLED_BOOTIMAGE_TARGET) \
|
$(INSTALLED_BOOTIMAGE_TARGET) \
|
||||||
@@ -4536,7 +4535,7 @@ ifeq ($(TARGET_BUILD_TYPE),debug)
|
|||||||
name := $(name)_debug
|
name := $(name)_debug
|
||||||
endif
|
endif
|
||||||
COVERAGE_ZIP := $(PRODUCT_OUT)/$(name).zip
|
COVERAGE_ZIP := $(PRODUCT_OUT)/$(name).zip
|
||||||
ifndef TARGET_BUILD_APPS
|
ifeq (,$(TARGET_BUILD_UNBUNDLED))
|
||||||
$(COVERAGE_ZIP): $(INSTALLED_SYSTEMIMAGE_TARGET) \
|
$(COVERAGE_ZIP): $(INSTALLED_SYSTEMIMAGE_TARGET) \
|
||||||
$(INSTALLED_RAMDISK_TARGET) \
|
$(INSTALLED_RAMDISK_TARGET) \
|
||||||
$(INSTALLED_BOOTIMAGE_TARGET) \
|
$(INSTALLED_BOOTIMAGE_TARGET) \
|
||||||
@@ -4611,7 +4610,7 @@ endif # EMMA_INSTRUMENT=true
|
|||||||
#
|
#
|
||||||
PROGUARD_DICT_ZIP := $(PRODUCT_OUT)/$(TARGET_PRODUCT)-proguard-dict-$(FILE_NAME_TAG).zip
|
PROGUARD_DICT_ZIP := $(PRODUCT_OUT)/$(TARGET_PRODUCT)-proguard-dict-$(FILE_NAME_TAG).zip
|
||||||
# For apps_only build we'll establish the dependency later in build/make/core/main.mk.
|
# For apps_only build we'll establish the dependency later in build/make/core/main.mk.
|
||||||
ifndef TARGET_BUILD_APPS
|
ifeq (,$(TARGET_BUILD_UNBUNDLED))
|
||||||
$(PROGUARD_DICT_ZIP): \
|
$(PROGUARD_DICT_ZIP): \
|
||||||
$(INSTALLED_SYSTEMIMAGE_TARGET) \
|
$(INSTALLED_SYSTEMIMAGE_TARGET) \
|
||||||
$(INSTALLED_RAMDISK_TARGET) \
|
$(INSTALLED_RAMDISK_TARGET) \
|
||||||
|
@@ -617,7 +617,7 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (,$(TARGET_BUILD_APPS))
|
ifeq (,$(TARGET_BUILD_UNBUNDLED))
|
||||||
ifdef PRODUCT_EXTRA_VNDK_VERSIONS
|
ifdef PRODUCT_EXTRA_VNDK_VERSIONS
|
||||||
$(foreach v,$(PRODUCT_EXTRA_VNDK_VERSIONS),$(call check_vndk_version,$(v)))
|
$(foreach v,$(PRODUCT_EXTRA_VNDK_VERSIONS),$(call check_vndk_version,$(v)))
|
||||||
endif
|
endif
|
||||||
|
@@ -94,10 +94,24 @@ endif
|
|||||||
|
|
||||||
TARGET_BUILD_APPS ?=
|
TARGET_BUILD_APPS ?=
|
||||||
|
|
||||||
|
# Set to true for an unbundled build, i.e. a build without
|
||||||
|
# support for platform targets like the system image. This also
|
||||||
|
# disables consistency checks that only apply to full platform
|
||||||
|
# builds.
|
||||||
|
TARGET_BUILD_UNBUNDLED ?=
|
||||||
|
|
||||||
|
# TARGET_BUILD_APPS implies unbundled build, otherwise we default
|
||||||
|
# to bundled (i.e. platform targets such as the system image are
|
||||||
|
# included).
|
||||||
|
ifneq ($(TARGET_BUILD_APPS),)
|
||||||
|
TARGET_BUILD_UNBUNDLED := true
|
||||||
|
endif
|
||||||
|
|
||||||
.KATI_READONLY := \
|
.KATI_READONLY := \
|
||||||
TARGET_PRODUCT \
|
TARGET_PRODUCT \
|
||||||
TARGET_BUILD_VARIANT \
|
TARGET_BUILD_VARIANT \
|
||||||
TARGET_BUILD_APPS
|
TARGET_BUILD_APPS \
|
||||||
|
TARGET_BUILD_UNBUNDLED \
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# Set up configuration for host machine. We don't do cross-
|
# Set up configuration for host machine. We don't do cross-
|
||||||
|
@@ -1221,8 +1221,8 @@ ifdef FULL_BUILD
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Some modules produce only host installed files when building with TARGET_BUILD_APPS
|
# Modules may produce only host installed files in unbundled builds.
|
||||||
ifeq ($(TARGET_BUILD_APPS),)
|
ifeq (,$(TARGET_BUILD_UNBUNDLED))
|
||||||
_modules := $(call resolve-bitness-for-modules,TARGET, \
|
_modules := $(call resolve-bitness-for-modules,TARGET, \
|
||||||
$(PRODUCT_PACKAGES) \
|
$(PRODUCT_PACKAGES) \
|
||||||
$(PRODUCT_PACKAGES_DEBUG) \
|
$(PRODUCT_PACKAGES_DEBUG) \
|
||||||
@@ -1611,7 +1611,7 @@ $(eval $(call combine-notice-files, html, \
|
|||||||
$(apps_only_installed_files)))
|
$(apps_only_installed_files)))
|
||||||
|
|
||||||
|
|
||||||
else # TARGET_BUILD_APPS
|
else ifeq (,$(TARGET_BUILD_UNBUNDLED))
|
||||||
$(call dist-for-goals, droidcore, \
|
$(call dist-for-goals, droidcore, \
|
||||||
$(INTERNAL_UPDATE_PACKAGE_TARGET) \
|
$(INTERNAL_UPDATE_PACKAGE_TARGET) \
|
||||||
$(INTERNAL_OTA_PACKAGE_TARGET) \
|
$(INTERNAL_OTA_PACKAGE_TARGET) \
|
||||||
@@ -1708,7 +1708,7 @@ else # TARGET_BUILD_APPS
|
|||||||
# Building a full system-- the default is to build droidcore
|
# Building a full system-- the default is to build droidcore
|
||||||
droid_targets: droidcore dist_files
|
droid_targets: droidcore dist_files
|
||||||
|
|
||||||
endif # TARGET_BUILD_APPS
|
endif # !TARGET_BUILD_UNBUNDLED
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: docs
|
||||||
docs: $(ALL_DOCS)
|
docs: $(ALL_DOCS)
|
||||||
|
@@ -39,7 +39,7 @@ $(call add_json_str, Platform_base_os, $(PLATFORM_BASE_OS))
|
|||||||
$(call add_json_str, Platform_min_supported_target_sdk_version, $(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION))
|
$(call add_json_str, Platform_min_supported_target_sdk_version, $(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION))
|
||||||
|
|
||||||
$(call add_json_bool, Allow_missing_dependencies, $(ALLOW_MISSING_DEPENDENCIES))
|
$(call add_json_bool, Allow_missing_dependencies, $(ALLOW_MISSING_DEPENDENCIES))
|
||||||
$(call add_json_bool, Unbundled_build, $(TARGET_BUILD_APPS))
|
$(call add_json_bool, Unbundled_build, $(TARGET_BUILD_UNBUNDLED))
|
||||||
$(call add_json_bool, Unbundled_build_sdks_from_source, $(UNBUNDLED_BUILD_SDKS_FROM_SOURCE))
|
$(call add_json_bool, Unbundled_build_sdks_from_source, $(UNBUNDLED_BUILD_SDKS_FROM_SOURCE))
|
||||||
$(call add_json_bool, Pdk, $(filter true,$(TARGET_BUILD_PDK)))
|
$(call add_json_bool, Pdk, $(filter true,$(TARGET_BUILD_PDK)))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user