File tree Expand file tree Collapse file tree 10 files changed +21
-42
lines changed Expand file tree Collapse file tree 10 files changed +21
-42
lines changed Original file line number Diff line number Diff line change @@ -698,7 +698,7 @@ if(EXECUTORCH_BUILD_EXECUTOR_RUNNER)
698698 endif ()
699699
700700 if (EXECUTORCH_ENABLE_EVENT_TRACER)
701- list (APPEND _executor_runner_libs etdump flatccrt )
701+ list (APPEND _executor_runner_libs etdump)
702702 endif ()
703703
704704 if (EXECUTORCH_BUILD_COREML)
Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ if(EXECUTORCH_CADENCE_CPU_RUNNER)
6767 extension_data_loader
6868 bundled_program
6969 cadence_ops_lib
70- flatccrt
7170 )
7271endif ()
7372
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ add_library(
4848target_link_libraries (
4949 etdump
5050 PUBLIC
51- flatccrt
51+ ${FLATCCRT_LIB}
5252 PRIVATE
5353 executorch
5454)
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ et_cxx_test(
2626 EXTRA_LIBS
2727 bundled_program
2828 etdump
29- flatccrt
3029)
3130target_include_directories (
3231 sdk_etdump_tests PRIVATE ${CMAKE_INSTALL_PREFIX} /sdk/include
Original file line number Diff line number Diff line change @@ -97,12 +97,6 @@ if(NOT CMAKE_TOOLCHAIN_FILE MATCHES ".*(iOS|ios\.toolchain)\.cmake$")
9797 list (TRANSFORM _mps_executor_runner__srcs PREPEND "${EXECUTORCH_ROOT} /" )
9898 add_executable (mps_executor_runner ${_mps_executor_runner__srcs} )
9999
100- if (CMAKE_BUILD_TYPE MATCHES "Debug" )
101- set (FLATCC_LIB flatccrt_d)
102- else ()
103- set (FLATCC_LIB flatccrt)
104- endif ()
105-
106100 if (CMAKE_BUILD_TYPE MATCHES "Debug" )
107101 target_link_options (mps_executor_runner PUBLIC -fsanitize=undefined)
108102 endif ()
@@ -113,7 +107,6 @@ if(NOT CMAKE_TOOLCHAIN_FILE MATCHES ".*(iOS|ios\.toolchain)\.cmake$")
113107 executorch
114108 gflags
115109 etdump
116- ${FLATCC_LIB}
117110 mpsdelegate
118111 mps_portable_ops_lib
119112 ${mps_executor_runner_libs}
Original file line number Diff line number Diff line change @@ -576,23 +576,7 @@ if(EXECUTORCH_ENABLE_EVENT_TRACER)
576576 "${ET_BUILD_DIR_PATH} /lib/libetdump.a"
577577 )
578578
579- if (CMAKE_BUILD_TYPE MATCHES "Debug" )
580- set (FLATCCRT_LIB flatccrt_d)
581- else ()
582- set (FLATCCRT_LIB flatccrt)
583- endif ()
584-
585- add_library (${FLATCCRT_LIB} STATIC IMPORTED )
586- set_property (
587- TARGET ${FLATCCRT_LIB}
588- PROPERTY IMPORTED_LOCATION
589- "${ET_BUILD_DIR_PATH} /lib/lib${FLATCCRT_LIB} .a"
590- )
591-
592- list (APPEND arm_executor_runner_link
593- etdump
594- ${FLATCCRT_LIB}
595- )
579+ list (APPEND arm_executor_runner_link etdump)
596580endif ()
597581
598582if (ET_BUNDLE_IO)
Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ target_link_libraries(
6060 etdump
6161 extension_data_loader
6262 bundled_program
63- flatccrt
6463 portable_ops_lib
6564 portable_kernels
6665)
Original file line number Diff line number Diff line change @@ -19,8 +19,11 @@ target_include_directories(
1919 qnn_executor_runner PUBLIC ${_common_include_directories}
2020)
2121target_link_libraries (
22- qnn_executor_runner qnn_executorch_backend full_portable_ops_lib etdump
23- ${FLATCCRT_LIB} gflags
22+ qnn_executor_runner
23+ qnn_executorch_backend
24+ full_portable_ops_lib
25+ etdump
26+ gflags
2427)
2528set_target_properties (
2629 qnn_executor_runner PROPERTIES LINK_FLAGS "-Wl,-rpath='$ORIGIN'"
Original file line number Diff line number Diff line change @@ -89,7 +89,9 @@ add_subdirectory(flatcc)
8989#
9090# Learn more: https://github.com/pytorch/executorch/pull/2467
9191set_property (TARGET flatccrt PROPERTY POSITION_INDEPENDENT_CODE ON )
92- install (
93- TARGETS flatccrt
94- DESTINATION ${CMAKE_BINARY_DIR} /lib
95- )
92+ # flatcc has a special debug target
93+ if (CMAKE_BUILD_TYPE MATCHES "Release" )
94+ set (FLATCCRT_LIB flatccrt CACHE STRING "flatccrt library" )
95+ else ()
96+ set (FLATCCRT_LIB flatccrt_d CACHE STRING "flatccrt library" )
97+ endif ()
Original file line number Diff line number Diff line change @@ -56,18 +56,11 @@ set(EXECUTORCH_FOUND ON)
5656
5757target_link_libraries (executorch INTERFACE executorch_core)
5858
59- if (CMAKE_BUILD_TYPE MATCHES "Debug" )
60- set (FLATCCRT_LIB flatccrt_d)
61- else ()
62- set (FLATCCRT_LIB flatccrt)
63- endif ()
64-
6559set (lib_list
6660 etdump
6761 bundled_program
6862 extension_data_loader
6963 extension_flat_tensor
70- ${FLATCCRT_LIB}
7164 coreml_util
7265 coreml_inmemoryfs
7366 coremldelegate
@@ -154,6 +147,13 @@ if(TARGET coremldelegate)
154147 )
155148endif ()
156149
150+ if (TARGET etdump)
151+ if (NOT FLATCCRT_LIB)
152+ message (FATAL_ERROR "FLATCCRT_LIB is not set" )
153+ endif ()
154+ set_target_properties (etdump PROPERTIES INTERFACE_LINK_LIBRARIES "${FLATCCRT_LIB} ;executorch" )
155+ endif ()
156+
157157if (TARGET optimized_native_cpu_ops_lib)
158158 if (TARGET optimized_portable_kernels)
159159 set (_maybe_optimized_portable_kernels_lib optimized_portable_kernels)
You can’t perform that action at this time.
0 commit comments