File tree Expand file tree Collapse file tree 10 files changed +21
-38
lines changed Expand file tree Collapse file tree 10 files changed +21
-38
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 @@ -45,10 +45,15 @@ add_library(
4545 ${CMAKE_CURRENT_SOURCE_DIR} /data_sinks/file_data_sink.cpp
4646 ${CMAKE_CURRENT_SOURCE_DIR} /data_sinks/file_data_sink.h
4747)
48+ if (CMAKE_BUILD_TYPE MATCHES "Debug" )
49+ set (FLATCCRT_LIB flatccrt_d)
50+ else ()
51+ set (FLATCCRT_LIB flatccrt)
52+ endif ()
4853target_link_libraries (
4954 etdump
5055 PUBLIC
51- flatccrt
56+ ${FLATCCRT_LIB}
5257 PRIVATE
5358 executorch
5459)
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,6 +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+ # flatcc appends a "_d" suffix (flatccrt_d) to debug builds. To simplify our
93+ # reference to the lib, remove the suffix.
94+ set_property (TARGET flatccrt PROPERTY DEBUG_POSTFIX "" )
9295install (
9396 TARGETS flatccrt
9497 DESTINATION ${CMAKE_BINARY_DIR} /lib
Original file line number Diff line number Diff line change @@ -56,18 +56,12 @@ 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
60+ flatccrt
6661 etdump
6762 bundled_program
6863 extension_data_loader
6964 extension_flat_tensor
70- ${FLATCCRT_LIB}
7165 coreml_util
7266 coreml_inmemoryfs
7367 coremldelegate
@@ -154,6 +148,10 @@ if(TARGET coremldelegate)
154148 )
155149endif ()
156150
151+ if (TARGET etdump)
152+ set_target_properties (etdump PROPERTIES INTERFACE_LINK_LIBRARIES "flatccrt;executorch" )
153+ endif ()
154+
157155if (TARGET optimized_native_cpu_ops_lib)
158156 if (TARGET optimized_portable_kernels)
159157 set (_maybe_optimized_portable_kernels_lib optimized_portable_kernels)
You can’t perform that action at this time.
0 commit comments