File tree Expand file tree Collapse file tree 8 files changed +11
-23
lines changed Expand file tree Collapse file tree 8 files changed +11
-23
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
5959 optimized_kernels
6060 ${_optimized_native_cpu_ops_lib_portable_kernels_lib}
6161 DEPS
62- executorch
62+ executorch_core
6363 )
6464
6565 install (TARGETS optimized_native_cpu_ops_lib DESTINATION lib)
Original file line number Diff line number Diff line change @@ -80,14 +80,12 @@ find_package(gflags REQUIRED)
8080# find `executorch` libraries Same as for gflags
8181set (executorch_DIR ${CMAKE_CURRENT_BINARY_DIR} /../../../lib/cmake/ExecuTorch)
8282find_package (executorch CONFIG REQUIRED)
83- if (CMAKE_TOOLCHAIN_IOS OR ANDROID)
84- target_link_options_shared_lib(executorch)
85- endif ()
83+ target_link_options_shared_lib(executorch)
8684
8785# llama_runner library
8886add_subdirectory (runner)
8987
90- set (link_libraries gflags)
88+ set (link_libraries executorch gflags)
9189set (_srcs main.cpp)
9290
9391if (EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
@@ -225,9 +223,5 @@ target_include_directories(
225223target_link_libraries (llama_main PUBLIC llama_runner ${link_libraries} )
226224target_compile_options (llama_main PUBLIC ${_common_compile_options} )
227225
228- if (APPLE )
229- target_link_options_shared_lib(executorch)
230- endif ()
231-
232226# Print all summary
233227executorch_print_configuration_summary()
Original file line number Diff line number Diff line change 5252 add_library (llama_runner SHARED ${_llama_runner__srcs} )
5353endif ()
5454
55- set (llama_runner_deps executorch extension_data_loader extension_module
55+ set (llama_runner_deps executorch_core extension_data_loader extension_module
5656 extension_tensor
5757)
5858
Original file line number Diff line number Diff line change @@ -89,14 +89,12 @@ endif()
8989# find `executorch` libraries Same as for gflags
9090set (executorch_DIR ${CMAKE_CURRENT_BINARY_DIR} /../../../lib/cmake/ExecuTorch)
9191find_package (executorch CONFIG REQUIRED)
92- if (CMAKE_TOOLCHAIN_IOS OR ANDROID)
93- target_link_options_shared_lib(executorch)
94- endif ()
92+ target_link_options_shared_lib(executorch)
9593
9694# llava_runner library
9795add_subdirectory (runner)
9896
99- set (LINK_LIBS gflags)
97+ set (LINK_LIBS executorch gflags)
10098if (NOT LLAVA_RUNNER_NO_TORCH_DUMMY_IMAGE)
10199 list (APPEND LINK_LIBS torch)
102100endif ()
@@ -212,9 +210,5 @@ target_include_directories(llava_main PUBLIC ${_common_include_directories})
212210target_link_libraries (llava_main PUBLIC llava_runner ${link_libraries} )
213211target_compile_options (llava_main PUBLIC ${_common_compile_options} )
214212
215- if (APPLE )
216- target_link_options_shared_lib(executorch)
217- endif ()
218-
219213# Print all summary
220214executorch_print_configuration_summary()
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ add_subdirectory(
4040
4141add_library (llava_runner STATIC ${_llava_runner__srcs} )
4242
43- set (llava_runner_deps executorch extension_data_loader extension_llm_runner
43+ set (llava_runner_deps executorch_core extension_data_loader extension_llm_runner
4444 extension_module extension_tensor
4545)
4646
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ endif()
1818
1919list (TRANSFORM _extension_flat_tensor__srcs PREPEND "${EXECUTORCH_ROOT} /" )
2020add_library (extension_flat_tensor ${_extension_flat_tensor__srcs} )
21- target_link_libraries (extension_flat_tensor executorch extension_data_loader )
21+ target_link_libraries (extension_flat_tensor executorch_core )
2222target_include_directories (
2323 extension_flat_tensor
2424 PUBLIC ${EXECUTORCH_ROOT} /..
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ target_compile_options(optimized_kernels PUBLIC ${_common_compile_options})
7171#
7272# optimized_ops_lib: Register optimized ops kernels into Executorch runtime
7373gen_operators_lib(
74- LIB_NAME "optimized_ops_lib" KERNEL_LIBS optimized_kernels DEPS executorch
74+ LIB_NAME "optimized_ops_lib" KERNEL_LIBS optimized_kernels DEPS executorch_core
7575)
7676
7777install (
Original file line number Diff line number Diff line change @@ -142,13 +142,13 @@ if(NOT CMAKE_GENERATOR STREQUAL "Xcode"
142142endif ()
143143
144144add_library (quantized_kernels ${_quantized_kernels__srcs} )
145- target_link_libraries (quantized_kernels PRIVATE executorch )
145+ target_link_libraries (quantized_kernels PRIVATE executorch_core )
146146target_compile_options (quantized_kernels PUBLIC ${_common_compile_options} )
147147# Build a library for _quantized_kernels_srcs
148148#
149149# quantized_ops_lib: Register quantized ops kernels into Executorch runtime
150150gen_operators_lib(
151- LIB_NAME "quantized_ops_lib" KERNEL_LIBS quantized_kernels DEPS executorch
151+ LIB_NAME "quantized_ops_lib" KERNEL_LIBS quantized_kernels DEPS executorch_core
152152)
153153
154154install (
You can’t perform that action at this time.
0 commit comments