File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,12 @@ if(EXECUTORCH_BUILD_LLAMA_JNI)
61
61
set (CUSTOM_OPS_PATH ${CMAKE_CURRENT_BINARY_DIR} /../../examples/models/llama2/custom_ops/libcustom_ops.a)
62
62
add_library (custom_ops STATIC IMPORTED )
63
63
set_property (TARGET custom_ops PROPERTY IMPORTED_LOCATION ${CUSTOM_OPS_PATH} )
64
+ target_link_options_shared_lib(custom_ops)
65
+
66
+ set (CUSTOM_OPS_LIB_PATH ${CMAKE_CURRENT_BINARY_DIR} /../../examples/models/llama2/custom_ops/libcustom_ops_lib.a)
67
+ add_library (custom_ops_lib STATIC IMPORTED )
68
+ set_property (TARGET custom_ops_lib PROPERTY IMPORTED_LOCATION ${CUSTOM_OPS_LIB_PATH} )
69
+ target_link_options_shared_lib(custom_ops_lib)
64
70
65
71
if (TARGET pthreadpool)
66
72
set (LLAMA_JNI_SRCS jni/jni_layer_llama.cpp ../../backends/xnnpack/threadpool/cpuinfo_utils.cpp)
@@ -77,6 +83,6 @@ if(EXECUTORCH_BUILD_LLAMA_JNI)
77
83
endif ()
78
84
target_include_directories (executorch_llama_jni PRIVATE ${_common_include_directories} )
79
85
target_link_libraries (executorch_llama_jni ${link_libraries} llama_runner
80
- custom_ops cpublas eigen_blas)
86
+ custom_ops custom_ops_lib cpublas eigen_blas)
81
87
target_compile_options (executorch_llama_jni PUBLIC ${_common_compile_options} )
82
88
endif ()
You can’t perform that action at this time.
0 commit comments