diff options
author | Elliott Hughes <enh@google.com> | 2014-01-28 17:32:30 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-01-28 17:32:30 -0800 |
commit | 52e52d14470a1a1db0940244b18259bc3cc48a22 (patch) | |
tree | 04bc6a1fa5293d0ca57383c95ce13e86f1ed5e5d /core/host_native_test.mk | |
parent | 0a3cf1a0e5c6dbe132c1dc5e13293960c5e7b103 (diff) | |
download | build-52e52d14470a1a1db0940244b18259bc3cc48a22.zip build-52e52d14470a1a1db0940244b18259bc3cc48a22.tar.gz build-52e52d14470a1a1db0940244b18259bc3cc48a22.tar.bz2 |
gtest needs -lpthread.
Host gtests that don't use pthreads themselves need to be linked
against libpthread because gtest itself uses pthreads to ensure
thread-safety. (It can't know in advance whether the code under
test is going to spin up threads, so it has to be pessimistic.)
Change-Id: I14fb1098c163d7fe6ae9a9a0314acead4ec9383d
Diffstat (limited to 'core/host_native_test.mk')
-rw-r--r-- | core/host_native_test.mk | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/host_native_test.mk b/core/host_native_test.mk index a5d87e4..a631364 100644 --- a/core/host_native_test.mk +++ b/core/host_native_test.mk @@ -10,4 +10,6 @@ LOCAL_C_INCLUDES += \ LOCAL_STATIC_LIBRARIES += libgtest_host libgtest_main_host LOCAL_SHARED_LIBRARIES += +LOCAL_LDFLAGS += -lpthread + include $(BUILD_HOST_EXECUTABLE) |