Do not link to pthread when targeting Android
I had issues compiling this for Android, and as it turns out, pthread functionality is part of Bionic itself and linking is not required.
This commit is contained in:
parent
8db7d24f98
commit
48cb3ac410
2 changed files with 3 additions and 2 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -543,7 +543,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
$ANDROID_HOME/cmake/3.22.1/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk/26.0.10792818/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-24 ..
|
$ANDROID_HOME/cmake/3.22.1/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk/26.0.10792818/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-24 -DBUILD_QJS_LIBC=ON ..
|
||||||
- name: Build android arm64
|
- name: Build android arm64
|
||||||
run: |
|
run: |
|
||||||
$ANDROID_HOME/cmake/3.22.1/bin/cmake --build build --target qjs
|
$ANDROID_HOME/cmake/3.22.1/bin/cmake --build build --target qjs
|
||||||
|
|
|
@ -155,7 +155,8 @@ endif()
|
||||||
list(APPEND qjs_defines _GNU_SOURCE)
|
list(APPEND qjs_defines _GNU_SOURCE)
|
||||||
list(APPEND qjs_libs qjs ${CMAKE_DL_LIBS})
|
list(APPEND qjs_libs qjs ${CMAKE_DL_LIBS})
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
list(APPEND qjs_libs m pthread)
|
find_package(Threads)
|
||||||
|
list(APPEND qjs_libs ${CMAKE_THREAD_LIBS_INIT} m)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(qjs ${qjs_sources})
|
add_library(qjs ${qjs_sources})
|
||||||
|
|
Loading…
Reference in a new issue