Skip to content
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

Fix linker script incorrectly selected for bare-metal profile #342

Merged

Conversation

ccli8
Copy link

@ccli8 ccli8 commented Sep 12, 2024

Summary of changes

This fixes linker script is incorrectly selected for bare-metal profile. mbed-os and mbed-baremetal library targets both are created, so we cannot use if(TARGET mbed-os) or if(TARGET mbed-baremetal) to determine which one the application target links to. Instead, determine by checking application target's LINK_LIBRARIES property.


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Copy link
Collaborator

@multiplemonomials multiplemonomials left a comment

Choose a reason for hiding this comment

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

Nice catch on this! We do indeed really need better testing coverage of the baremetal builds. Just one comment

tools/cmake/mbed_target_functions.cmake Show resolved Hide resolved
mbed-os and mbed-baremetal library targets both are created, so we cannot
use if(TARGET mbed-os) or if(TARGET mbed-baremetal) to determine which one
the application target links to. Instead, determine by checking application
target's LINK_LIBRARIES property.
@ccli8 ccli8 force-pushed the build_fix_baremetal_linker_script branch from d26c512 to d2cc1f9 Compare September 13, 2024 05:21
@multiplemonomials multiplemonomials merged commit a49d8f2 into mbed-ce:master Sep 13, 2024
10 checks passed
@ccli8 ccli8 deleted the build_fix_baremetal_linker_script branch September 13, 2024 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants