Skip to content

Commit 4c81197

Browse files
mped-oticonaescolar
authored andcommitted
cmake: rename construct_add_custom_command_for_linker_pass macro
Now that we avoid the two-step procedure, we can simplify the name of the construct_add_custom_command_for_linker_pass macro. Move description comment up to head of definition, making the purpose clearer. No functional change expected. Signed-off-by: Mark Ruvald Pedersen <[email protected]>
1 parent 11d6bae commit 4c81197

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,8 @@ endif()
408408

409409
configure_file(version.h.in ${PROJECT_BINARY_DIR}/include/generated/version.h)
410410

411-
macro(construct_add_custom_command_for_linker_pass linker_output_name)
411+
# Run $LINKER_SCRIPT file through the C preprocessor, producing ${linker_output_name}.cmd
412+
macro(configure_linker_script linker_output_name)
412413
set(extra_dependencies ${ARGN})
413414
set(linker_cmd_file_name ${linker_output_name}.cmd)
414415

@@ -440,8 +441,6 @@ macro(construct_add_custom_command_for_linker_pass linker_output_name)
440441
get_filename_component(base_name ${CMAKE_CURRENT_BINARY_DIR} NAME)
441442
get_property(current_defines GLOBAL PROPERTY PROPERTY_LINKER_SCRIPT_DEFINES)
442443

443-
# Run $LINKER_SCRIPT through the C preprocessor, producing $linker_cmd_file_name
444-
445444
add_custom_command(
446445
OUTPUT ${linker_cmd_file_name}
447446
DEPENDS
@@ -731,7 +730,7 @@ if (CONFIG_CODE_DATA_RELOCATION)
731730
set(CODE_RELOCATION_DEP code_relocation_source_lib)
732731
endif() # CONFIG_CODE_DATA_RELOCATION
733732

734-
construct_add_custom_command_for_linker_pass(
733+
configure_linker_script(
735734
linker
736735
${PRIV_STACK_DEP}
737736
${APP_SMEM_ALIGNED_DEP}
@@ -1159,7 +1158,7 @@ if(CONFIG_USERSPACE)
11591158
COMMENT "Generating app_smem_unaligned linker section"
11601159
)
11611160

1162-
construct_add_custom_command_for_linker_pass(
1161+
configure_linker_script(
11631162
linker_app_smem_unaligned
11641163
${CODE_RELOCATION_DEP}
11651164
${APP_SMEM_UNALIGNED_DEP}
@@ -1203,7 +1202,7 @@ if(CONFIG_USERSPACE)
12031202
endif()
12041203

12051204
if(CONFIG_USERSPACE AND CONFIG_ARM)
1206-
construct_add_custom_command_for_linker_pass(
1205+
configure_linker_script(
12071206
linker_priv_stacks
12081207
${CODE_RELOCATION_DEP}
12091208
${APP_SMEM_ALIGNED_DEP}
@@ -1249,7 +1248,7 @@ else()
12491248
# The second linker pass uses the same source linker script of the
12501249
# first pass (LINKER_SCRIPT), but this time with a different output
12511250
# file and preprocessed with the define LINKER_PASS2.
1252-
construct_add_custom_command_for_linker_pass(
1251+
configure_linker_script(
12531252
linker_pass_final
12541253
${PRIV_STACK_DEP}
12551254
${CODE_RELOCATION_DEP}

0 commit comments

Comments
 (0)