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 CMake dependency error with custom linker scripts #406

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

multiplemonomials
Copy link
Collaborator

Summary of changes

Fix dependency error with custom linker scripts. Back in #362 I added the LINK_DEPENDS property so that executables would be rebuilt if the linker script changed. However, it caused a circular dependency error with custom linker scripts, because the linker script was expected to exist before the link command (which generated the linker script) could be run! This PR fixes this by putting the dependency on the raw file instead of the preprocessed one.

Impact of changes

Migration actions required

Documentation

None

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)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

This can build @JojoS62 's test project for custom linker scripts


Copy link

@JojoS62 JojoS62 left a comment

Choose a reason for hiding this comment

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

my older project works with these changes again.

@JojoS62 JojoS62 merged commit 2f3a3c3 into master Dec 20, 2024
52 checks passed
@JojoS62 JojoS62 deleted the bugfix/custom-linker-script-depend-error branch December 20, 2024 12:41
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