Skip to content
Permalink
Browse files

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 <mped@oticon.com>
  • Loading branch information...
mped-oticon authored and aescolar committed Apr 29, 2019
1 parent 11d6bae commit 4c811971f5bf2839396f6f5ed2250314193b02a3
Showing with 6 additions and 7 deletions.
  1. +6 −7 CMakeLists.txt
@@ -408,7 +408,8 @@ endif()

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

macro(construct_add_custom_command_for_linker_pass linker_output_name)
# Run $LINKER_SCRIPT file through the C preprocessor, producing ${linker_output_name}.cmd
macro(configure_linker_script linker_output_name)
set(extra_dependencies ${ARGN})
set(linker_cmd_file_name ${linker_output_name}.cmd)

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

# Run $LINKER_SCRIPT through the C preprocessor, producing $linker_cmd_file_name

add_custom_command(
OUTPUT ${linker_cmd_file_name}
DEPENDS
@@ -731,7 +730,7 @@ if (CONFIG_CODE_DATA_RELOCATION)
set(CODE_RELOCATION_DEP code_relocation_source_lib)
endif() # CONFIG_CODE_DATA_RELOCATION

construct_add_custom_command_for_linker_pass(
configure_linker_script(
linker
${PRIV_STACK_DEP}
${APP_SMEM_ALIGNED_DEP}
@@ -1159,7 +1158,7 @@ if(CONFIG_USERSPACE)
COMMENT "Generating app_smem_unaligned linker section"
)

construct_add_custom_command_for_linker_pass(
configure_linker_script(
linker_app_smem_unaligned
${CODE_RELOCATION_DEP}
${APP_SMEM_UNALIGNED_DEP}
@@ -1203,7 +1202,7 @@ if(CONFIG_USERSPACE)
endif()

if(CONFIG_USERSPACE AND CONFIG_ARM)
construct_add_custom_command_for_linker_pass(
configure_linker_script(
linker_priv_stacks
${CODE_RELOCATION_DEP}
${APP_SMEM_ALIGNED_DEP}
@@ -1249,7 +1248,7 @@ else()
# The second linker pass uses the same source linker script of the
# first pass (LINKER_SCRIPT), but this time with a different output
# file and preprocessed with the define LINKER_PASS2.
construct_add_custom_command_for_linker_pass(
configure_linker_script(
linker_pass_final
${PRIV_STACK_DEP}
${CODE_RELOCATION_DEP}

0 comments on commit 4c81197

Please sign in to comment.
You can’t perform that action at this time.