File tree Expand file tree Collapse file tree 4 files changed +18
-9
lines changed Expand file tree Collapse file tree 4 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -576,16 +576,22 @@ if(EXECUTORCH_ENABLE_EVENT_TRACER)
576576 "${ET_BUILD_DIR_PATH} /lib/libetdump.a"
577577 )
578578
579- add_library (flatccrt STATIC IMPORTED )
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 )
580586 set_property (
581- TARGET flatccrt
587+ TARGET ${FLATCCRT_LIB}
582588 PROPERTY IMPORTED_LOCATION
583- "${ET_BUILD_DIR_PATH} /third-party/flatcc/ lib/libflatccrt .a"
589+ "${ET_BUILD_DIR_PATH} /lib/lib ${FLATCCRT_LIB} .a"
584590 )
585591
586592 list (APPEND arm_executor_runner_link
587593 etdump
588- flatccrt
594+ ${FLATCCRT_LIB}
589595 )
590596endif ()
591597
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ target_include_directories(
2020)
2121target_link_libraries (
2222 qnn_executor_runner qnn_executorch_backend full_portable_ops_lib etdump
23- flatccrt gflags
23+ ${FLATCCRT_LIB} gflags
2424)
2525set_target_properties (
2626 qnn_executor_runner PROPERTIES LINK_FLAGS "-Wl,-rpath='$ORIGIN'"
Original file line number Diff line number Diff line change @@ -89,9 +89,6 @@ 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" (flatccrt_d) on debug builds. To simplify the build system
93- # just force the same name for both builds.
94- set_property (TARGET flatccrt PROPERTY DEBUG_POSTFIX "" )
9592install (
9693 TARGETS flatccrt
9794 DESTINATION ${CMAKE_BINARY_DIR} /lib
Original file line number Diff line number Diff line change @@ -56,12 +56,18 @@ 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+
5965set (lib_list
6066 etdump
6167 bundled_program
6268 extension_data_loader
6369 extension_flat_tensor
64- flatccrt
70+ ${FLATCCRT_LIB}
6571 coreml_util
6672 coreml_inmemoryfs
6773 coremldelegate
You can’t perform that action at this time.
0 commit comments