Skip to content

cmake: Supports specifying link script prefix parameters #16710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

W-M-R
Copy link
Contributor

@W-M-R W-M-R commented Jul 11, 2025

Note: Please adhere to Contributing Guidelines.

Summary

cmake: Supports specifying link script prefix parameters
For example, armclang does not support -T

Impact

No impact

Testing

ci

@github-actions github-actions bot added Area: Build system Size: S The size of the change in this PR is small labels Jul 11, 2025
For example, armclang does not support -T

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
@@ -659,8 +664,7 @@ if(NOT CONFIG_ARCH_SIM)
target_link_libraries(
nuttx
PRIVATE ${NUTTX_EXTRA_FLAGS}
-T
${ldscript}
${LINK_SCRIPT_FLAG}${ldscript}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a space -> ${LINK_SCRIPT_FLAG} ${ldscript}

target_link_options(nuttx PUBLIC $<$<NOT:$<BOOL:${APPLE}>>:-T nuttx.ld>
$<$<BOOL:${CONFIG_SIM_M32}>:-m32>)
target_link_options(
nuttx PUBLIC $<$<NOT:$<BOOL:${APPLE}>>:${LINK_SCRIPT_FLAG}nuttx.ld>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a space -> ${LINK_SCRIPT_FLAG} nuttx.ld

@@ -828,8 +833,7 @@ if(CONFIG_BUILD_PROTECTED)

target_link_libraries(
nuttx_user
PRIVATE -T
${user_ldscript}
PRIVATE ${LINK_SCRIPT_FLAG}${user_ldscript}
Copy link
Contributor

@simbit18 simbit18 Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a space -> ${LINK_SCRIPT_FLAG} ${user_ldscript}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Build system Size: S The size of the change in this PR is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants