Skip to content

Commit b672388

Browse files
committed
undo changes
1 parent 3707716 commit b672388

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

examples/arm/executor_runner/CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff 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
)
590596
endif()
591597

examples/qualcomm/executor_runner/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ target_include_directories(
2020
)
2121
target_link_libraries(
2222
qnn_executor_runner qnn_executorch_backend full_portable_ops_lib etdump
23-
flatccrt gflags
23+
${FLATCCRT_LIB} gflags
2424
)
2525
set_target_properties(
2626
qnn_executor_runner PROPERTIES LINK_FLAGS "-Wl,-rpath='$ORIGIN'"

third-party/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ add_subdirectory(flatcc)
8989
#
9090
# Learn more: https://github.com/pytorch/executorch/pull/2467
9191
set_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 "")
9592
install(
9693
TARGETS flatccrt
9794
DESTINATION ${CMAKE_BINARY_DIR}/lib

tools/cmake/executorch-config.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,18 @@ set(EXECUTORCH_FOUND ON)
5656

5757
target_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+
5965
set(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

0 commit comments

Comments
 (0)