Skip to content

Commit 0b9997c

Browse files
Updates
1 parent 68ce1b2 commit 0b9997c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/cmake/mbed_set_linker_script.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ function(mbed_setup_linker_script mbed_os_target mbed_baremetal_target target_de
6060
add_custom_command(
6161
OUTPUT
6262
${LINKER_SCRIPT_PATH}
63-
PRE_LINK
64-
COMMAND
63+
COMMAND
6564
${CMAKE_COMMAND} -E echo "Preprocess linker script: ${RAW_LINKER_SCRIPT_NAME} -> ${LINKER_SCRIPT_NAME}"
6665
COMMAND
6766
${CMAKE_C_COMPILER} @${linker_defs_response_file}
@@ -130,7 +129,7 @@ function(mbed_set_custom_linker_script target new_linker_script_path)
130129
${target}
131130
PRE_LINK
132131
COMMAND
133-
${CMAKE_COMMAND} -E echo "Preprocess custom linker script: ${RAW_LINKER_SCRIPT_NAME} -> ${LINKER_SCRIPT_NAME}"
132+
${CMAKE_COMMAND} -E echo "Preprocess custom linker script ${RAW_LINKER_SCRIPT_NAME} to ${LINKER_SCRIPT_NAME}"
134133
COMMAND
135134
${CMAKE_C_COMPILER} @${linker_defs_response_file}
136135
-E -x assembler-with-cpp
@@ -151,5 +150,6 @@ function(mbed_set_custom_linker_script target new_linker_script_path)
151150
PRIVATE
152151
"-T" "${CUSTOM_LINKER_SCRIPT_PATH}"
153152
)
153+
set_property(TARGET ${target} APPEND PROPERTY LINK_DEPENDS ${RAW_LINKER_SCRIPT_PATHS})
154154

155155
endfunction(mbed_set_custom_linker_script)

0 commit comments

Comments
 (0)