Skip to content

Commit 3df25f3

Browse files
committed
applications: nrf_desktop: nrf54h20: disable LTO in the IPC Radio image
Disabled the Link Time Optimization (LTO) for the nrf54h20dk/nrf54h20/cpurad board target in the IPC Radio image configuration of the nRF Desktop application. This change is done to prevent the LTO warnings about the type mismatch (-Wlto-type-mismatch) in the device_deps.c file, which is autogenerated if the CONFIG_DEVICE_DEPS Kconfig option is enabled. This file is required by the Zephyr domain driver to notify child devices in the domain to turn on or off when the domain itself is powered up or down. Ref: NCSDK-35587 Signed-off-by: Kamil Piszczek <[email protected]>
1 parent c19fa1a commit 3df25f3

File tree

4 files changed

+28
-12
lines changed

4 files changed

+28
-12
lines changed

applications/nrf_desktop/configuration/nrf54h20dk_nrf54h20_cpurad/images/ipc_radio/prj.conf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ CONFIG_RESET_ON_FATAL_ERROR=n
3939

4040
CONFIG_SPEED_OPTIMIZATIONS=y
4141

42-
# Activate Link Time Optimization (LTO)
43-
CONFIG_LTO=y
44-
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
42+
# Temporarily disable Link Time Optimization (LTO) to prevent linker warnings about the type
43+
# mismatch (-Wlto-type-mismatch) that are caused by the device_deps.c file. The device_deps.c
44+
# file is autogenerated and its generation is controlled by the CONFIG_DEVICE_DEPS Kconfig option.
45+
# This file is required by the Zephyr domain driver to notify child devices in the domain to turn
46+
# on or off when the domain itself is powered up or down.
47+
CONFIG_LTO=n
48+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=n
4549

4650
# Enable Zephyr system power management
4751
CONFIG_PM=y

applications/nrf_desktop/configuration/nrf54h20dk_nrf54h20_cpurad/images/ipc_radio/prj_dongle.conf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ CONFIG_RESET_ON_FATAL_ERROR=n
4343

4444
CONFIG_SPEED_OPTIMIZATIONS=y
4545

46-
# Activate Link Time Optimization (LTO)
47-
CONFIG_LTO=y
48-
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
46+
# Temporarily disable Link Time Optimization (LTO) to prevent linker warnings about the type
47+
# mismatch (-Wlto-type-mismatch) that are caused by the device_deps.c file. The device_deps.c
48+
# file is autogenerated and its generation is controlled by the CONFIG_DEVICE_DEPS Kconfig option.
49+
# This file is required by the Zephyr domain driver to notify child devices in the domain to turn
50+
# on or off when the domain itself is powered up or down.
51+
CONFIG_LTO=n
52+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=n
4953

5054
# Enable Zephyr system power management
5155
CONFIG_PM=y

applications/nrf_desktop/configuration/nrf54h20dk_nrf54h20_cpurad/images/ipc_radio/prj_release.conf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ CONFIG_RESET_ON_FATAL_ERROR=y
3939

4040
CONFIG_SPEED_OPTIMIZATIONS=y
4141

42-
# Activate Link Time Optimization (LTO)
43-
CONFIG_LTO=y
44-
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
42+
# Temporarily disable Link Time Optimization (LTO) to prevent linker warnings about the type
43+
# mismatch (-Wlto-type-mismatch) that are caused by the device_deps.c file. The device_deps.c
44+
# file is autogenerated and its generation is controlled by the CONFIG_DEVICE_DEPS Kconfig option.
45+
# This file is required by the Zephyr domain driver to notify child devices in the domain to turn
46+
# on or off when the domain itself is powered up or down.
47+
CONFIG_LTO=n
48+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=n
4549

4650
# Enable Zephyr system power management
4751
CONFIG_PM=y

applications/nrf_desktop/configuration/nrf54h20dk_nrf54h20_cpurad/images/ipc_radio/prj_release_dongle.conf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ CONFIG_RESET_ON_FATAL_ERROR=y
4343

4444
CONFIG_SPEED_OPTIMIZATIONS=y
4545

46-
# Activate Link Time Optimization (LTO)
47-
CONFIG_LTO=y
48-
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
46+
# Temporarily disable Link Time Optimization (LTO) to prevent linker warnings about the type
47+
# mismatch (-Wlto-type-mismatch) that are caused by the device_deps.c file. The device_deps.c
48+
# file is autogenerated and its generation is controlled by the CONFIG_DEVICE_DEPS Kconfig option.
49+
# This file is required by the Zephyr domain driver to notify child devices in the domain to turn
50+
# on or off when the domain itself is powered up or down.
51+
CONFIG_LTO=n
52+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=n
4953

5054
# Enable Zephyr system power management
5155
CONFIG_PM=y

0 commit comments

Comments
 (0)