@@ -456,22 +456,22 @@ endif()
456456add_subdirectory (schema)
457457
458458#
459- # executorch_no_prim_ops : Minimal runtime library
459+ # executorch_core : Minimal runtime library
460460#
461461# The bare-minimum runtime library, supporting the Program and Method
462462# interfaces. Does not contain any operators, including primitive ops. Does not
463463# contain any backends.
464464#
465465
466466# Remove any PAL-definition files from the sources.
467- list (FILTER _executorch_no_prim_ops__srcs EXCLUDE REGEX
467+ list (FILTER _executorch_core__srcs EXCLUDE REGEX
468468 "runtime/platform/default/[^/]*.cpp$"
469469)
470470
471471# Add the source file that maps to the requested default PAL implementation.
472472if (EXECUTORCH_PAL_DEFAULT MATCHES "^(posix|minimal)$" )
473473 message (STATUS "executorch: Using PAL default '${EXECUTORCH_PAL_DEFAULT} '" )
474- list (APPEND _executorch_no_prim_ops__srcs
474+ list (APPEND _executorch_core__srcs
475475 "runtime/platform/default/${EXECUTORCH_PAL_DEFAULT} .cpp"
476476 )
477477else ()
@@ -481,45 +481,49 @@ else()
481481 )
482482endif ()
483483
484- add_library (executorch_no_prim_ops ${_executorch_no_prim_ops__srcs} )
485- target_link_libraries (executorch_no_prim_ops PRIVATE program_schema)
484+ add_library (executorch_core ${_executorch_core__srcs} )
485+
486+ # Legacy name alias.
487+ add_library (executorch_no_prim_ops ALIAS executorch_core)
488+
489+ target_link_libraries (executorch_core PRIVATE program_schema)
486490if (EXECUTORCH_USE_DL)
487491 # Check if dl exists for this toolchain and only then link it.
488492 find_library (DL_LIBRARY_EXISTS NAMES dl)
489493 # Check if the library was found
490494 if (DL_LIBRARY_EXISTS)
491- target_link_libraries (executorch_no_prim_ops PRIVATE dl) # For dladdr()
495+ target_link_libraries (executorch_core PRIVATE dl) # For dladdr()
492496 endif ()
493497endif ()
494498target_include_directories (
495- executorch_no_prim_ops PUBLIC ${_common_include_directories}
499+ executorch_core PUBLIC ${_common_include_directories}
496500)
497- target_compile_options (executorch_no_prim_ops PUBLIC ${_common_compile_options} )
501+ target_compile_options (executorch_core PUBLIC ${_common_compile_options} )
498502if (MAX_KERNEL_NUM)
499503 target_compile_definitions (
500- executorch_no_prim_ops PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
504+ executorch_core PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
501505 )
502506endif ()
503507
504508if (EXECUTORCH_BUILD_PYBIND AND APPLE )
505509 # shared version
506510 add_library (
507- executorch_no_prim_ops_shared SHARED ${_executorch_no_prim_ops__srcs }
511+ executorch_core_shared SHARED ${_executorch_core__srcs }
508512 )
509- target_link_libraries (executorch_no_prim_ops_shared PRIVATE program_schema)
513+ target_link_libraries (executorch_core_shared PRIVATE program_schema)
510514 if (DL_LIBRARY_EXISTS)
511515 # For dladdr()
512- target_link_libraries (executorch_no_prim_ops_shared PRIVATE dl)
516+ target_link_libraries (executorch_core_shared PRIVATE dl)
513517 endif ()
514518 target_include_directories (
515- executorch_no_prim_ops_shared PUBLIC ${_common_include_directories}
519+ executorch_core_shared PUBLIC ${_common_include_directories}
516520 )
517521 target_compile_options (
518- executorch_no_prim_ops_shared PUBLIC ${_common_compile_options}
522+ executorch_core_shared PUBLIC ${_common_compile_options}
519523 )
520524 if (MAX_KERNEL_NUM)
521525 target_compile_definitions (
522- executorch_no_prim_ops_shared PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
526+ executorch_core_shared PRIVATE MAX_KERNEL_NUM=${MAX_KERNEL_NUM}
523527 )
524528 endif ()
525529endif ()
@@ -532,7 +536,7 @@ endif()
532536# any backends.
533537#
534538add_library (executorch ${_executorch__srcs} )
535- target_link_libraries (executorch PRIVATE executorch_no_prim_ops )
539+ target_link_libraries (executorch PRIVATE executorch_core )
536540target_include_directories (executorch PUBLIC ${_common_include_directories} )
537541target_compile_options (executorch PUBLIC ${_common_compile_options} )
538542target_link_options_shared_lib(executorch)
@@ -568,7 +572,7 @@ endif()
568572# Install `executorch` library as well as `executorch-config.cmake` under
569573# ${CMAKE_INSTALL_PREFIX}/
570574install (
571- TARGETS executorch executorch_no_prim_ops
575+ TARGETS executorch executorch_core
572576 DESTINATION lib
573577 INCLUDES
574578 DESTINATION ${_common_include_directories}
0 commit comments