Skip to content

Commit

Permalink
[Build] Link pthreadpool and cpuinfo for windows.
Browse files Browse the repository at this point in the history
There is no direct replacement for libpthread.so on Windows.
Link pthreadpool and cpuinfo staticly for windows.

For #4661

Pull Request resolved: #4860
  • Loading branch information
python3kgae authored Aug 23, 2024
1 parent bf71fd4 commit b157e5f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extension/llm/custom_ops/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ if(EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT)
endif()

target_link_libraries(custom_ops_aot_lib PUBLIC cpublas torch)
if(WIN32)
# There is no direct replacement for libpthread.so on Windows.
# For the Windows build, link directly against pthreadpool and cpuinfo.
target_link_libraries(custom_ops_aot_lib PUBLIC pthreadpool cpuinfo)
endif()
target_compile_options(
custom_ops_aot_lib
PUBLIC -Wno-deprecated-declarations -fPIC -frtti -fexceptions
Expand Down

0 comments on commit b157e5f

Please sign in to comment.