@@ -707,15 +707,15 @@ endif()
707707# Does not contain portable kernels or other full operators. Does not contain
708708# any backends.
709709#
710- add_library (executorch ${_executorch__srcs} )
711- target_link_libraries (executorch PRIVATE executorch_core )
712- target_include_directories (executorch PUBLIC ${_common_include_directories} )
713- target_compile_definitions (executorch PUBLIC C10_USING_CUSTOM_GENERATED_MACROS )
710+ add_library (prim_ops_lib ${_executorch__srcs} )
711+ target_link_libraries (prim_ops_lib PRIVATE executorch_core )
712+ target_include_directories (prim_ops_lib PUBLIC ${_common_include_directories} )
713+ target_compile_definitions (prim_ops_lib PUBLIC C10_USING_CUSTOM_GENERATED_MACROS )
714714if (NOT EXECUTORCH_ENABLE_LOGGING)
715- target_compile_definitions (executorch PUBLIC ET_LOG_ENABLED=0 )
715+ target_compile_definitions (prim_ops_lib PUBLIC ET_LOG_ENABLED=0 )
716716endif ()
717- target_compile_options (executorch PUBLIC ${_common_compile_options} )
718- executorch_target_link_options_shared_lib (executorch )
717+ target_compile_options (prim_ops_lib PUBLIC ${_common_compile_options} )
718+ executorch_target_link_options_shared_lib (prim_ops_lib )
719719
720720#
721721# portable_ops_lib: A library to register core ATen ops using portable kernels,
@@ -805,7 +805,7 @@ install(
805805 PATTERN "*.h"
806806)
807807install (
808- TARGETS executorch executorch_core
808+ TARGETS prim_ops_lib executorch_core
809809 EXPORT ExecuTorchTargets
810810 INCLUDES
811811 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
@@ -1070,7 +1070,7 @@ if(EXECUTORCH_BUILD_SHARED)
10701070 # the WHOLE_ARCHIVE link feature, because these archives also reference each
10711071 # other plainly and CMake before 3.29 refuses to mix a feature with a plain
10721072 # reference to the same item.
1073- target_link_libraries (executorch_shared PRIVATE executorch )
1073+ target_link_libraries (executorch_shared PRIVATE prim_ops_lib )
10741074 set (_executorch_shared_whole_archive executorch_core)
10751075 foreach (_ext_target
10761076 extension_data_loader extension_flat_tensor extension_named_data_map
@@ -1129,7 +1129,7 @@ endif()
11291129# when it is named.
11301130if (EXECUTORCH_ENABLE_EVENT_TRACER)
11311131 target_compile_definitions (executorch_core INTERFACE ET_EVENT_TRACER_ENABLED )
1132- target_compile_definitions (executorch INTERFACE ET_EVENT_TRACER_ENABLED )
1132+ target_compile_definitions (prim_ops_lib INTERFACE ET_EVENT_TRACER_ENABLED )
11331133 if (TARGET executorch_shared)
11341134 target_compile_definitions (
11351135 executorch_shared INTERFACE ET_EVENT_TRACER_ENABLED
@@ -1452,7 +1452,7 @@ if(EXECUTORCH_BUILD_PYBIND)
14521452 if (EXECUTORCH_BUILD_SHARED)
14531453 target_link_libraries (util PRIVATE torch c10 executorch_shared )
14541454 else ()
1455- target_link_libraries (util PRIVATE torch c10 executorch extension_tensor )
1455+ target_link_libraries (util PRIVATE torch c10 prim_ops_lib extension_tensor )
14561456 endif ()
14571457
14581458 # pybind portable_lib
@@ -1562,7 +1562,7 @@ if(EXECUTORCH_BUILD_PYBIND)
15621562 data_loader "extension/pybindings" "executorch/extension/pybindings"
15631563 )
15641564 else ()
1565- target_link_libraries (data_loader PRIVATE executorch )
1565+ target_link_libraries (data_loader PRIVATE prim_ops_lib )
15661566 endif ()
15671567 install (TARGETS data_loader
15681568 LIBRARY DESTINATION executorch/extension/pybindings
@@ -1753,7 +1753,7 @@ install(TARGETS executorch_backends executorch_extensions executorch_kernels
17531753
17541754if (EXECUTORCH_BUILD_EXECUTOR_RUNNER)
17551755 # Baseline libraries that executor_runner will link against.
1756- set (_executor_runner_libs executorch extension_evalue_util
1756+ set (_executor_runner_libs prim_ops_lib extension_evalue_util
17571757 extension_runner_util gflags executorch_backends
17581758 )
17591759
0 commit comments