Skip to content

Commit 4e285f4

Browse files
authored
Arm backend: Simplify linking in example executor_runner (pytorch#21491)
- Do not use --whole-archive unless needed. - Remove targets that are linked from other target. Removes some complexity and noise. cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani Signed-off-by: Erik Lundell <erik.lundell@arm.com>
1 parent e798c4d commit 4e285f4

1 file changed

Lines changed: 2 additions & 21 deletions

File tree

‎examples/arm/executor_runner/CMakeLists.txt‎

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -320,17 +320,11 @@ list(
320320
quantized_ops_lib
321321
cortex_m_ops_lib
322322
executorch_delegate_ethos_u
323+
-Wl,--no-whole-archive
323324
quantized_kernels
324325
cortex_m_kernels
325326
portable_kernels
326-
executorch_core
327327
cmsis-nn
328-
ethosu_core_driver
329-
timing_adapter
330-
ethosu_mhu_dummy
331-
ethosu_mailbox
332-
ethosu_uart_cmsdk_apb
333-
-Wl,--no-whole-archive
334328
kernels_util_all_deps
335329
-Wl,--end-group
336330
-Xlinker
@@ -479,20 +473,7 @@ endif()
479473
# before this target's objects and before the runner's dependency closure, which
480474
# breaks bare-metal archive resolution for the runner.
481475
set(_arm_runner_whole_archive_targets
482-
executorch
483-
quantized_ops_lib
484-
cortex_m_ops_lib
485-
executorch_delegate_ethos_u
486-
quantized_kernels
487-
cortex_m_kernels
488-
portable_kernels
489-
executorch_core
490-
cmsis-nn
491-
ethosu_core_driver
492-
timing_adapter
493-
ethosu_mhu_dummy
494-
ethosu_mailbox
495-
ethosu_uart_cmsdk_apb
476+
executorch quantized_ops_lib cortex_m_ops_lib executorch_delegate_ethos_u
496477
)
497478
if(TARGET arm_portable_ops_lib)
498479
list(APPEND _arm_runner_whole_archive_targets arm_portable_ops_lib)

0 commit comments

Comments
 (0)