@@ -458,22 +458,22 @@ endif()
458458add_subdirectory (schema)
459459
460460#
461- # executorch_no_prim_ops : Minimal runtime library
461+ # executorch_core : Minimal runtime library
462462#
463463# The bare-minimum runtime library, supporting the Program and Method
464464# interfaces. Does not contain any operators, including primitive ops. Does not
465465# contain any backends.
466466#
467467
468468# Remove any PAL-definition files from the sources.
469- list (FILTER _executorch_no_prim_ops__srcs EXCLUDE REGEX
469+ list (FILTER _executorch_core__srcs EXCLUDE REGEX
470470 "runtime/platform/default/[^/]*.cpp$"
471471)
472472
473473# Add the source file that maps to the requested default PAL implementation.
474474if (EXECUTORCH_PAL_DEFAULT MATCHES "^(posix|minimal)$" )
475475 message (STATUS "executorch: Using PAL default '${EXECUTORCH_PAL_DEFAULT} '" )
476- list (APPEND _executorch_no_prim_ops__srcs
476+ list (APPEND _executorch_core__srcs
477477 "runtime/platform/default/${EXECUTORCH_PAL_DEFAULT} .cpp"
478478 )
479479else ()
@@ -483,45 +483,49 @@ else()
483483 )
484484endif ()
485485
486- add_library (executorch_no_prim_ops ${_executorch_no_prim_ops__srcs} )
487- target_link_libraries (executorch_no_prim_ops PRIVATE program_schema)
486+ add_library (executorch_core ${_executorch_core__srcs} )
487+
488+ # Legacy name alias.
489+ add_library (executorch_no_prim_ops ALIAS executorch_core)
490+
491+ target_link_libraries (executorch_core PRIVATE program_schema)
488492if (EXECUTORCH_USE_DL)
489493 # Check if dl exists for this toolchain and only then link it.
490494 find_library (DL_LIBRARY_EXISTS NAMES dl)
491495 # Check if the library was found
492496 if (DL_LIBRARY_EXISTS)
493- target_link_libraries (executorch_no_prim_ops PRIVATE dl) # For dladdr()
497+ target_link_libraries (executorch_core PRIVATE dl) # For dladdr()
494498 endif ()
495499endif ()
496500target_include_directories (
497- executorch_no_prim_ops PUBLIC ${_common_include_directories}
501+ executorch_core PUBLIC ${_common_include_directories}
498502)
499- target_compile_options (executorch_no_prim_ops PUBLIC ${_common_compile_options} )
503+ target_compile_options (executorch_core PUBLIC ${_common_compile_options} )
500504if (MAX_KERNEL_NUM)
501505 target_compile_definitions (
502- executorch_no_prim_ops PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
506+ executorch_core PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
503507 )
504508endif ()
505509
506510if (EXECUTORCH_BUILD_PYBIND AND APPLE )
507511 # shared version
508512 add_library (
509- executorch_no_prim_ops_shared SHARED ${_executorch_no_prim_ops__srcs }
513+ executorch_core_shared SHARED ${_executorch_core__srcs }
510514 )
511- target_link_libraries (executorch_no_prim_ops_shared PRIVATE program_schema)
515+ target_link_libraries (executorch_core_shared PRIVATE program_schema)
512516 if (DL_LIBRARY_EXISTS)
513517 # For dladdr()
514- target_link_libraries (executorch_no_prim_ops_shared PRIVATE dl)
518+ target_link_libraries (executorch_core_shared PRIVATE dl)
515519 endif ()
516520 target_include_directories (
517- executorch_no_prim_ops_shared PUBLIC ${_common_include_directories}
521+ executorch_core_shared PUBLIC ${_common_include_directories}
518522 )
519523 target_compile_options (
520- executorch_no_prim_ops_shared PUBLIC ${_common_compile_options}
524+ executorch_core_shared PUBLIC ${_common_compile_options}
521525 )
522526 if (MAX_KERNEL_NUM)
523527 target_compile_definitions (
524- executorch_no_prim_ops_shared PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
528+ executorch_core_shared PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
525529 )
526530 endif ()
527531endif ()
@@ -534,7 +538,7 @@ endif()
534538# any backends.
535539#
536540add_library (executorch ${_executorch__srcs} )
537- target_link_libraries (executorch PRIVATE executorch_no_prim_ops )
541+ target_link_libraries (executorch PRIVATE executorch_core )
538542target_include_directories (executorch PUBLIC ${_common_include_directories} )
539543target_compile_options (executorch PUBLIC ${_common_compile_options} )
540544target_link_options_shared_lib(executorch)
@@ -570,7 +574,7 @@ endif()
570574# Install `executorch` library as well as `executorch-config.cmake` under
571575# ${CMAKE_INSTALL_PREFIX}/
572576install (
573- TARGETS executorch executorch_no_prim_ops
577+ TARGETS executorch executorch_core
574578 DESTINATION lib
575579 INCLUDES
576580 DESTINATION ${_common_include_directories}
0 commit comments