Skip to content

Commit dbbeda3

Browse files
committed
Let's see what will fail
1 parent 6af42d7 commit dbbeda3

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

CMakeLists.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ endif()
531531
add_subdirectory(schema)
532532

533533
#
534-
# executorch_core: Minimal runtime library
534+
# executorch_core: Primary runtime library
535535
#
536536
# The bare-minimum runtime library, supporting the Program and Method
537537
# interfaces. Does not contain any operators, including primitive ops. Does not
@@ -606,18 +606,17 @@ if(EXECUTORCH_BUILD_PYBIND AND APPLE)
606606
endif()
607607

608608
#
609-
# executorch: Primary runtime library with primitive operators.
609+
# prim_ops_lib: primitive operators.
610610
#
611-
# Provides the Program and Method interfaces, along with primitive operators.
612-
# Does not contain portable kernels or other full operators. Does not contain
613-
# any backends.
611+
# Provides primitive operators with registration.
614612
#
615-
add_library(executorch ${_executorch__srcs})
616-
target_link_libraries(executorch PRIVATE executorch_core)
617-
target_include_directories(executorch PUBLIC ${_common_include_directories})
618-
target_compile_definitions(executorch PUBLIC C10_USING_CUSTOM_GENERATED_MACROS)
619-
target_compile_options(executorch PUBLIC ${_common_compile_options})
620-
target_link_options_shared_lib(executorch)
613+
add_library(prim_ops_lib ${_executorch__srcs})
614+
target_link_libraries(prim_ops_lib PRIVATE executorch_core)
615+
target_include_directories(prim_ops_lib PUBLIC ${_common_include_directories})
616+
target_compile_definitions(prim_ops_lib PUBLIC C10_USING_CUSTOM_GENERATED_MACROS)
617+
target_compile_options(prim_ops_lib PUBLIC ${_common_compile_options})
618+
target_link_options_shared_lib(prim_ops_lib)
619+
add_library(executorch ALIAS prim_ops_lib)
621620

622621
#
623622
# portable_ops_lib: A library to register core ATen ops using portable kernels,
@@ -660,7 +659,7 @@ install(DIRECTORY extension/kernel_util/ DESTINATION include/executorch/extensi
660659
install(DIRECTORY extension/tensor/ DESTINATION include/executorch/extension/tensor FILES_MATCHING PATTERN "*.h")
661660
install(DIRECTORY extension/threadpool/ DESTINATION include/executorch/extension/threadpool FILES_MATCHING PATTERN "*.h")
662661
install(
663-
TARGETS executorch executorch_core
662+
TARGETS executorch_core prim_ops_lib executorch
664663
DESTINATION lib
665664
INCLUDES
666665
DESTINATION ${_common_include_directories}
@@ -878,7 +877,7 @@ endif()
878877

879878
if(EXECUTORCH_BUILD_EXECUTOR_RUNNER)
880879
# Baseline libraries that executor_runner will link against.
881-
set(_executor_runner_libs executorch gflags)
880+
set(_executor_runner_libs executorch_core prim_ops_lib gflags)
882881

883882
if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
884883
list(APPEND _executor_runner_libs optimized_native_cpu_ops_lib)

tools/cmake/executorch-config.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
cmake_minimum_required(VERSION 3.19)
2727

2828
set(_root "${CMAKE_CURRENT_LIST_DIR}/../../..")
29-
set(required_lib_list executorch executorch_core portable_kernels)
29+
set(required_lib_list executorch_core prim_ops_lib portable_kernels)
3030
set(EXECUTORCH_LIBRARIES)
3131
set(EXECUTORCH_INCLUDE_DIRS
3232
${_root}/include ${_root}/include/executorch/runtime/core/portable_type/c10

0 commit comments

Comments
 (0)