diff --git a/core/envsetup.mk b/core/envsetup.mk index 8749a326c..ddf903c36 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -124,11 +124,13 @@ BUILD_OS := $(HOST_OS) HOST_CROSS_OS := # We can cross-build Windows binaries on Linux ifeq ($(HOST_OS),linux) +ifeq ($(BUILD_HOST_static),) HOST_CROSS_OS := windows HOST_CROSS_ARCH := x86 HOST_CROSS_2ND_ARCH := x86_64 2ND_HOST_CROSS_IS_64_BIT := true endif +endif ifeq ($(HOST_OS),) $(error Unable to determine HOST_OS from uname -sm: $(UNAME)!) diff --git a/tools/zipalign/Android.bp b/tools/zipalign/Android.bp index e80054aa4..8e6196d29 100644 --- a/tools/zipalign/Android.bp +++ b/tools/zipalign/Android.bp @@ -15,19 +15,18 @@ cc_binary_host { cflags: ["-Wall", "-Werror"], + // NOTE: Do not add any shared_libs dependencies because they will break the + // static_sdk_tools target. static_libs: [ "libutils", "libcutils", "liblog", + "libziparchive", + "libz", + "libbase", "libzopfli", ], - shared_libs: [ - "libbase", - "libz", - "libziparchive" - ], - target: { windows: { host_ldlibs: ["-lpthread"],