From 616e7fd9b6460455f75506b4db157915bd300807 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Thu, 16 Sep 2021 14:50:08 -0700 Subject: [PATCH] Stop disting monolithic SDK for Mac SDK builds The Mac SDK build is being reduced to just the build-tools and platform-tools packages. I'm still working on refactoring those builds not to require the monolithic SDK to be built first, but we can at least stop distributing it (and other related files) now. Most of these checks can likely go away once the build refactor is complete, since we'll be able to move away from the `sdk` target to something more specific. Right now there's a lot of logic around sdk being in MAKECMDGOALS that I don't want to unravel with the current build logic. Bug: 187222815 Change-Id: I1f711ce063170e41078ad4a125bcd77340a1746c --- core/Makefile | 10 ++++++++++ core/main.mk | 2 ++ 2 files changed, 12 insertions(+) diff --git a/core/Makefile b/core/Makefile index 4b2a331cbe..c51babb7b1 100644 --- a/core/Makefile +++ b/core/Makefile @@ -163,7 +163,9 @@ ndk-docs: $(ndk_doxygen_out)/index.html .PHONY: ndk-docs endif +ifeq ($(HOST_OS),linux) $(call dist-for-goals,sdk,$(API_FINGERPRINT)) +endif INSTALLED_RECOVERYIMAGE_TARGET := # Build recovery image if @@ -775,7 +777,9 @@ $(INSTALLED_FILES_FILE_ROOT) : $(INTERNAL_ROOT_FILES) $(FILESLIST) $(FILESLIST_U $(FILESLIST) $(TARGET_ROOT_OUT) > $(@:.txt=.json) $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ +ifeq ($(HOST_OS),linux) $(call dist-for-goals, sdk win_sdk sdk_addon, $(INSTALLED_FILES_FILE_ROOT)) +endif #------------------------------------------------------------------ # dtb @@ -805,7 +809,9 @@ $(INSTALLED_FILES_FILE_RAMDISK) : $(INTERNAL_RAMDISK_FILES) $(FILESLIST) $(FILES $(FILESLIST) $(TARGET_RAMDISK_OUT) > $(@:.txt=.json) $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ +ifeq ($(HOST_OS),linux) $(call dist-for-goals, sdk win_sdk sdk_addon, $(INSTALLED_FILES_FILE_RAMDISK)) +endif BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img ifeq ($(BOARD_RAMDISK_USE_LZ4),true) @@ -2808,7 +2814,9 @@ $(INSTALLED_FILES_FILE): $(FULL_SYSTEMIMAGE_DEPS) $(FILESLIST) $(FILESLIST_UTIL) .PHONY: installed-file-list installed-file-list: $(INSTALLED_FILES_FILE) +ifeq ($(HOST_OS),linux) $(call dist-for-goals, sdk win_sdk sdk_addon, $(INSTALLED_FILES_FILE)) +endif systemimage_intermediates := \ $(call intermediates-dir-for,PACKAGING,systemimage) @@ -5375,7 +5383,9 @@ $(NDK_SYSROOT_TARGET): $(SOONG_OUT_DIR)/ndk.timestamp @echo Package NDK sysroot... $(hide) tar cjf $@ -C $(SOONG_OUT_DIR) ndk +ifeq ($(HOST_OS),linux) $(call dist-for-goals,sdk,$(NDK_SYSROOT_TARGET)) +endif ifeq ($(build_ota_package),true) # ----------------------------------------------------------------- diff --git a/core/main.mk b/core/main.mk index 6b8080c7b5..8ba1396cd8 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1913,6 +1913,7 @@ endif # TARGET_BUILD_UNBUNDLED == TARGET_BUILD_UNBUNDLED_IMAGE docs: $(ALL_DOCS) .PHONY: sdk win_sdk winsdk-tools sdk_addon +ifeq ($(HOST_OS),linux) ALL_SDK_TARGETS := $(INTERNAL_SDK_TARGET) sdk: $(ALL_SDK_TARGETS) $(call dist-for-goals,sdk win_sdk, \ @@ -1922,6 +1923,7 @@ $(call dist-for-goals,sdk win_sdk, \ $(APPCOMPAT_ZIP) \ $(INSTALLED_BUILD_PROP_TARGET) \ ) +endif # umbrella targets to assit engineers in verifying builds .PHONY: java native target host java-host java-target native-host native-target \