Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 533e447

Browse files
committed
add imported lib
1 parent 177b432 commit 533e447

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

runner/et.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ if(executorch_FOUND)
6969
list(APPEND _common_include_directories
7070
${XNNPACK_ROOT}/third-party/pthreadpool/include)
7171
endif()
72+
add_library(custom_ops STATIC IMPORTED)
73+
set_property(TARGET custom_ops PROPERTY IMPORTED_LOCATION ${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install/lib/libcustom_ops.a)
7274

7375
target_include_directories(executorch INTERFACE ${_common_include_directories}) # Ideally ExecuTorch installation process would do this
7476
add_executable(et_run ${_srcs})
@@ -109,6 +111,8 @@ if(executorch_FOUND)
109111
target_link_options_shared_lib(executorch)
110112
endif()
111113

114+
# target_link_libraries(et_run PRIVATE
115+
# "$<LINK_LIBRARY:WHOLE_ARCHIVE,${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install/lib/libcustom_ops.a>")
112116
# This one is needed for cpuinfo where it uses android specific log lib
113117
if(ANDROID)
114118
target_link_libraries(et_run PRIVATE log)

0 commit comments

Comments
 (0)