From 349f891d94221b43ccbc91a80af7b3fef2a33142 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Tue, 18 Aug 2015 15:38:24 -0700 Subject: [PATCH] Update windows sdk to build non-recursively Now the build system can support a HOST_CROSS_OS to build both linux and windows binaries at the same time. Bug: 23566667 Change-Id: I82b497c2621fbfbe493d0568fca42863c5fe9433 --- build/tools/windows_sdk.mk | 18 ++------ build/windows_sdk_whitelist.mk | 83 ---------------------------------- 2 files changed, 4 insertions(+), 97 deletions(-) delete mode 100644 build/windows_sdk_whitelist.mk diff --git a/build/tools/windows_sdk.mk b/build/tools/windows_sdk.mk index 38b45edff..7d586a8c4 100644 --- a/build/tools/windows_sdk.mk +++ b/build/tools/windows_sdk.mk @@ -37,21 +37,12 @@ WIN_TARGETS := \ fastboot \ hprof-conv \ llvm-rs-cc \ - prebuilt \ sqlite3 \ zipalign \ split-select \ $(WIN_SDK_TARGETS) -# This is the list of *Linux* build tools that we need -# in order to be able to make the WIN_TARGETS. They are -# build prerequisites. -WIN_BUILD_PREREQ := \ - acp \ - llvm-tblgen \ - clang-tblgen \ - $(WIN_SDK_BUILD_PREREQ) - +WIN_TARGETS := $(foreach t,$(WIN_TARGETS),$(ALL_MODULES.host_cross_$(t).INSTALLED)) # MAIN_SDK_NAME/DIR is set in build/core/Makefile WIN_SDK_NAME := $(subst $(HOST_OS)-$(SDK_HOST_ARCH),windows,$(MAIN_SDK_NAME)) @@ -78,11 +69,10 @@ endef win_sdk: $(WIN_SDK_ZIP) $(call winsdk-banner,Done) -winsdk-tools: $(WIN_BUILD_PREREQ) - $(call winsdk-banner,Build Windows Tools) - $(hide) USE_MINGW=1 USE_CCACHE="" $(MAKE) PRODUCT-$(TARGET_PRODUCT)-$(strip $(WIN_TARGETS)) $(if $(hide),,showcommands) +winsdk-tools: $(WIN_TARGETS) + $(call winsdk-banner,Tools Done) -$(WIN_SDK_ZIP): winsdk-tools sdk +$(WIN_SDK_ZIP): $(WIN_TARGETS) $(INTERNAL_SDK_TARGET) $(call winsdk-banner,Build $(WIN_SDK_NAME)) $(call winsdk-info) $(hide) rm -rf $(WIN_SDK_DIR) diff --git a/build/windows_sdk_whitelist.mk b/build/windows_sdk_whitelist.mk deleted file mode 100644 index bf04360f0..000000000 --- a/build/windows_sdk_whitelist.mk +++ /dev/null @@ -1,83 +0,0 @@ -# Whitelist of SDK projects that can be built for the SDK on Windows - -# The Windows SDK cannot build all the projects from the SDK tree, typically -# due to obvious compiler/architectures differences. When building the Windows -# SDK, we only care about a subset of projects (e.g. generally the SDK tools -# and a few platform-specific binaries.) -# -# This file defines a whitelist of projects that can be built in the Windows -# SDK case. Note that whitelisting a project directory will NOT actually build -# it -- it will only allow one to reference it as a make dependency. -# -# This file is included by build/core/main.mk. - -# Note that there are 2 flavors of this file: -# -# - The other file: sdk/build/windows_sdk_whitelist.mk -# must list all projects that are that are NOT specific to a given platform. -# These binaries are the ones typically found in the SDK/tools directory. -# -# - This file: development/build/windows_sdk_whitelist.mk -# must list all projects that are specific to a given platform. These -# projects generate files that are generally locates in SDK/platform-tools, -# or SDK/platforms/, etc. - -# ----- -# Whitelist of platform specific projects that do NOT need Java (e.g. C libraries) - -subdirs += \ - prebuilt \ - prebuilts \ - build/libs/host \ - build/tools/zipalign \ - dalvik/dexdump \ - dalvik/libdex \ - dalvik/tools/dmtracedump \ - dalvik/tools/hprof-conv \ - development/host \ - development/tools/etc1tool \ - development/tools/line_endings \ - external/clang \ - external/easymock \ - external/expat \ - external/gtest \ - external/libcxx \ - external/libcxxabi \ - external/compiler-rt \ - external/libpng \ - external/llvm \ - external/protobuf \ - external/sqlite/dist \ - external/zlib \ - external/zopfli \ - frameworks/base \ - frameworks/compile \ - frameworks/native \ - frameworks/rs \ - frameworks/tools \ - system/core/adb \ - system/core/base \ - system/core/fastboot \ - system/core/libcutils \ - system/core/liblog \ - system/core/libsparse \ - system/core/libziparchive \ - system/core/libutils \ - system/extras/ext4_utils - -# ----- -# Whitelist of platform specific projects that DO require Java - -ifneq (,$(shell which javac 2>/dev/null)) -subdirs += \ - build/tools/signapk \ - dalvik/dx \ - libcore \ - development/apps \ - development/tools/mkstubs \ - frameworks/compile/libbcc \ - packages - -else -$(warning SDK_ONLY: javac not available.) -endif