@@ -531,7 +531,7 @@ endif()
531531add_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)
606606endif ()
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
660659install (DIRECTORY extension/tensor/ DESTINATION include /executorch/extension/tensor FILES_MATCHING PATTERN "*.h" )
661660install (DIRECTORY extension/threadpool/ DESTINATION include /executorch/extension/threadpool FILES_MATCHING PATTERN "*.h" )
662661install (
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
879878if (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)
0 commit comments