aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2021-10-19 00:32:54 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-10-19 00:32:54 +0000
commitf478b8487bc8de24e700b8febe445cc6ec0a15ae (patch)
treeba81c0f238ff9177f421118204669d53264e9cfe
parentada4df3f1a1c6ccf8d07d7f65c59770dbb9af9ee (diff)
parent349dc0793379cfbed1e126813f6b53fb25c7ceda (diff)
downloadbuild-f478b8487bc8de24e700b8febe445cc6ec0a15ae.tar.gz
Merge "Shrink Mac builds"
-rw-r--r--core/main.mk23
1 files changed, 19 insertions, 4 deletions
diff --git a/core/main.mk b/core/main.mk
index a2d76aaa98..18994ce57c 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -534,7 +534,12 @@ FULL_BUILD := true
# Include all of the makefiles in the system
#
-subdir_makefiles := $(SOONG_ANDROID_MK) $(file <$(OUT_DIR)/.module_paths/Android.mk.list) $(SOONG_OUT_DIR)/late-$(TARGET_PRODUCT).mk
+subdir_makefiles := $(SOONG_ANDROID_MK)
+# Android.mk files are only used on Linux builds, Mac only supports Android.bp
+ifeq ($(HOST_OS),linux)
+ subdir_makefiles += $(file <$(OUT_DIR)/.module_paths/Android.mk.list)
+endif
+subdir_makefiles += $(SOONG_OUT_DIR)/late-$(TARGET_PRODUCT).mk
subdir_makefiles_total := $(words int $(subdir_makefiles) post finish)
.KATI_READONLY := subdir_makefiles_total
@@ -1310,7 +1315,11 @@ $(if $(strip $(1)), \
)
endef
-ifdef FULL_BUILD
+ifeq ($(HOST_OS),darwin)
+ # Target builds are not supported on Mac
+ product_target_FILES :=
+ product_host_FILES := $(call host-installed-files,$(INTERNAL_PRODUCT))
+else ifdef FULL_BUILD
ifneq (true,$(ALLOW_MISSING_DEPENDENCIES))
# Check to ensure that all modules in PRODUCT_PACKAGES exist (opt in per product)
ifeq (true,$(PRODUCT_ENFORCE_PACKAGES_EXIST))
@@ -1466,7 +1475,9 @@ endif
# contains everything that's built during the current make, but it also further
# extends ALL_DEFAULT_INSTALLED_MODULES.
ALL_DEFAULT_INSTALLED_MODULES := $(modules_to_install)
-include $(BUILD_SYSTEM)/Makefile
+ifeq ($(HOST_OS),linux)
+ include $(BUILD_SYSTEM)/Makefile
+endif
modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES))
ALL_DEFAULT_INSTALLED_MODULES :=
@@ -1687,7 +1698,11 @@ ifeq ($(SOONG_COLLECT_JAVA_DEPS), true)
endif
.PHONY: apps_only
-ifneq ($(TARGET_BUILD_APPS),)
+ifeq ($(HOST_OS),darwin)
+ # Mac only supports building host modules
+ droid_targets: $(filter $(HOST_OUT_ROOT)/%,$(modules_to_install)) dist_files
+
+else ifneq ($(TARGET_BUILD_APPS),)
# If this build is just for apps, only build apps and not the full system by default.
unbundled_build_modules :=