From c2e984eec8be27f67c5cf7c73060d84e1e0bf8b4 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Tue, 21 Feb 2017 15:27:57 -0800 Subject: [PATCH] adb: remove win32 dependency on libwinpthread-1.dll. Explicitly link against the static libwinpthread.a to avoid a dependency on the dll. Also, make the tests link against libbase statically. Bug: http://b/31665213 Test: wine adb.exe Test: wine adb_test.exe Change-Id: Ifd41afcb1756a4b9b6db12e102b4db502e73d846 --- adb/Android.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adb/Android.mk b/adb/Android.mk index b444afad1..c51e0b87b 100644 --- a/adb/Android.mk +++ b/adb/Android.mk @@ -216,9 +216,9 @@ LOCAL_SRC_FILES_linux := $(LIBADB_TEST_linux_SRCS) LOCAL_SRC_FILES_darwin := $(LIBADB_TEST_darwin_SRCS) LOCAL_SRC_FILES_windows := $(LIBADB_TEST_windows_SRCS) LOCAL_SANITIZE := $(adb_host_sanitize) -LOCAL_SHARED_LIBRARIES := libbase LOCAL_STATIC_LIBRARIES := \ libadb \ + libbase \ libcrypto_utils \ libcrypto \ libcutils \ @@ -232,7 +232,7 @@ LOCAL_STATIC_LIBRARIES_darwin := libusb LOCAL_LDFLAGS_windows := -municode LOCAL_LDLIBS_linux := -lrt -ldl -lpthread LOCAL_LDLIBS_darwin := -framework CoreFoundation -framework IOKit -lobjc -LOCAL_LDLIBS_windows := -lws2_32 -luserenv +LOCAL_LDLIBS_windows := -lws2_32 -luserenv -static -lwinpthread LOCAL_STATIC_LIBRARIES_windows := AdbWinApi LOCAL_MULTILIB := first @@ -249,7 +249,7 @@ LOCAL_LDLIBS_darwin := -lpthread -framework CoreFoundation -framework IOKit -fra # Use wmain instead of main LOCAL_LDFLAGS_windows := -municode -LOCAL_LDLIBS_windows := -lws2_32 -lgdi32 +LOCAL_LDLIBS_windows := -lws2_32 -lgdi32 -static -lwinpthread LOCAL_STATIC_LIBRARIES_windows := AdbWinApi LOCAL_REQUIRED_MODULES_windows := AdbWinApi AdbWinUsbApi