diff --git a/extension/llm/custom_ops/CMakeLists.txt b/extension/llm/custom_ops/CMakeLists.txt index 1d9cf1e1f24..41c8c0ee160 100644 --- a/extension/llm/custom_ops/CMakeLists.txt +++ b/extension/llm/custom_ops/CMakeLists.txt @@ -93,7 +93,9 @@ if(EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT) target_link_libraries(custom_ops_aot_lib PUBLIC executorch_no_prim_ops) endif() - target_link_libraries(custom_ops_aot_lib PUBLIC cpublas torch) + target_link_libraries( + custom_ops_aot_lib PUBLIC cpublas torch extension_threadpool + ) if(WIN32) # There is no direct replacement for libpthread.so on Windows. For the # Windows build, link directly against pthreadpool and cpuinfo. diff --git a/extension/threadpool/CMakeLists.txt b/extension/threadpool/CMakeLists.txt index 674d3136e1a..a82afc045a3 100644 --- a/extension/threadpool/CMakeLists.txt +++ b/extension/threadpool/CMakeLists.txt @@ -21,7 +21,9 @@ if(NOT CMAKE_CXX_STANDARD) endif() add_library(extension_threadpool threadpool.cpp threadpool_guard.cpp cpuinfo_utils.cpp) -target_link_libraries(extension_threadpool PUBLIC executorch cpuinfo pthreadpool) +target_link_libraries( + extension_threadpool PUBLIC executorch_no_prim_ops cpuinfo pthreadpool +) target_include_directories(extension_threadpool PUBLIC ${EXECUTORCH_ROOT}/..) target_include_directories( extension_threadpool