@@ -458,22 +458,22 @@ endif()
458
458
add_subdirectory (schema)
459
459
460
460
#
461
- # executorch_no_prim_ops : Minimal runtime library
461
+ # executorch_core : Minimal runtime library
462
462
#
463
463
# The bare-minimum runtime library, supporting the Program and Method
464
464
# interfaces. Does not contain any operators, including primitive ops. Does not
465
465
# contain any backends.
466
466
#
467
467
468
468
# 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
470
470
"runtime/platform/default/[^/]*.cpp$"
471
471
)
472
472
473
473
# Add the source file that maps to the requested default PAL implementation.
474
474
if (EXECUTORCH_PAL_DEFAULT MATCHES "^(posix|minimal)$" )
475
475
message (STATUS "executorch: Using PAL default '${EXECUTORCH_PAL_DEFAULT} '" )
476
- list (APPEND _executorch_no_prim_ops__srcs
476
+ list (APPEND _executorch_core__srcs
477
477
"runtime/platform/default/${EXECUTORCH_PAL_DEFAULT} .cpp"
478
478
)
479
479
else ()
@@ -483,45 +483,49 @@ else()
483
483
)
484
484
endif ()
485
485
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)
488
492
if (EXECUTORCH_USE_DL)
489
493
# Check if dl exists for this toolchain and only then link it.
490
494
find_library (DL_LIBRARY_EXISTS NAMES dl)
491
495
# Check if the library was found
492
496
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()
494
498
endif ()
495
499
endif ()
496
500
target_include_directories (
497
- executorch_no_prim_ops PUBLIC ${_common_include_directories}
501
+ executorch_core PUBLIC ${_common_include_directories}
498
502
)
499
- target_compile_options (executorch_no_prim_ops PUBLIC ${_common_compile_options} )
503
+ target_compile_options (executorch_core PUBLIC ${_common_compile_options} )
500
504
if (MAX_KERNEL_NUM)
501
505
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}
503
507
)
504
508
endif ()
505
509
506
510
if (EXECUTORCH_BUILD_PYBIND AND APPLE )
507
511
# shared version
508
512
add_library (
509
- executorch_no_prim_ops_shared SHARED ${_executorch_no_prim_ops__srcs }
513
+ executorch_core_shared SHARED ${_executorch_core__srcs }
510
514
)
511
- target_link_libraries (executorch_no_prim_ops_shared PRIVATE program_schema)
515
+ target_link_libraries (executorch_core_shared PRIVATE program_schema)
512
516
if (DL_LIBRARY_EXISTS)
513
517
# For dladdr()
514
- target_link_libraries (executorch_no_prim_ops_shared PRIVATE dl)
518
+ target_link_libraries (executorch_core_shared PRIVATE dl)
515
519
endif ()
516
520
target_include_directories (
517
- executorch_no_prim_ops_shared PUBLIC ${_common_include_directories}
521
+ executorch_core_shared PUBLIC ${_common_include_directories}
518
522
)
519
523
target_compile_options (
520
- executorch_no_prim_ops_shared PUBLIC ${_common_compile_options}
524
+ executorch_core_shared PUBLIC ${_common_compile_options}
521
525
)
522
526
if (MAX_KERNEL_NUM)
523
527
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}
525
529
)
526
530
endif ()
527
531
endif ()
@@ -534,7 +538,7 @@ endif()
534
538
# any backends.
535
539
#
536
540
add_library (executorch ${_executorch__srcs} )
537
- target_link_libraries (executorch PRIVATE executorch_no_prim_ops )
541
+ target_link_libraries (executorch PRIVATE executorch_core )
538
542
target_include_directories (executorch PUBLIC ${_common_include_directories} )
539
543
target_compile_options (executorch PUBLIC ${_common_compile_options} )
540
544
target_link_options_shared_lib(executorch)
@@ -570,7 +574,7 @@ endif()
570
574
# Install `executorch` library as well as `executorch-config.cmake` under
571
575
# ${CMAKE_INSTALL_PREFIX}/
572
576
install (
573
- TARGETS executorch executorch_no_prim_ops
577
+ TARGETS executorch executorch_core
574
578
DESTINATION lib
575
579
INCLUDES
576
580
DESTINATION ${_common_include_directories}
0 commit comments