summaryrefslogtreecommitdiffstats
path: root/core/combo/HOST_windows-x86.mk
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-04-28 00:35:19 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2012-04-28 00:53:55 +0800
commitf9613a4f730b8a385971f95150582b9a543302ae (patch)
treef9651c70667c33ca43fc3315f5c6d7dcc86ae2bf /core/combo/HOST_windows-x86.mk
parentf8dc89b49ac64331f23c97d6aad3866dd3fb7344 (diff)
downloadbuild-f9613a4f730b8a385971f95150582b9a543302ae.zip
build-f9613a4f730b8a385971f95150582b9a543302ae.tar.gz
build-f9613a4f730b8a385971f95150582b9a543302ae.tar.bz2
Added BUILD_HOST_static to build statically linked executable/shared-lib
Statically linked executable/shared-lib (eg. SDK tools) are useful in sandboxed environment. In BUILD_HOST_static zipalign needs -lpthread indirectly: zipalign->libutils.a->liblog.a->logd_write.c->pthread Change-Id: I8fa91a937b728ccdf942c4ba199efb1e2e49da3d
Diffstat (limited to 'core/combo/HOST_windows-x86.mk')
-rw-r--r--core/combo/HOST_windows-x86.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/combo/HOST_windows-x86.mk b/core/combo/HOST_windows-x86.mk
index fe4bd66..85bc1e0 100644
--- a/core/combo/HOST_windows-x86.mk
+++ b/core/combo/HOST_windows-x86.mk
@@ -46,6 +46,10 @@ HOST_AR := $(TOOLS_PREFIX)ar$(TOOLS_EXE_SUFFIX)
HOST_GLOBAL_CFLAGS += -include $(call select-android-config-h,windows)
HOST_GLOBAL_LDFLAGS += --enable-stdcall-fixup
+ifneq ($(strip $(BUILD_HOST_static)),)
+# Statically-linked binaries are desirable for sandboxed environment
+HOST_GLOBAL_LDFLAGS += -static
+endif # BUILD_HOST_static
# when building under Cygwin, ensure that we use Mingw compilation by default.
# you can disable this (i.e. to generate Cygwin executables) by defining the