Skip to content

Commit

Permalink
build: don't link against -lpthread on Android
Browse files Browse the repository at this point in the history
On Android, pthread is part of the C standard library. Hence, there is
no need to specify -lpthread when building for Android.

PR-URL: libuv#2110
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
Michael Meier authored and cjihrig committed Dec 14, 2018
1 parent 7a2c889 commit 67e771f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ if(WIN32)
list(APPEND uv_test_sources src/win/snprintf.c test/runner-win.c)
else()
list(APPEND uv_defines _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE)
list(APPEND uv_libraries pthread)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
# Android has pthread as part of its c library, not as a separate
# libpthread.so.
list(APPEND uv_libraries pthread)
endif()
list(APPEND uv_sources
src/unix/async.c
src/unix/core.c
Expand Down

0 comments on commit 67e771f

Please sign in to comment.