arch/sim: Add dependencies for Rust cargo in make builds#19037
Open
toku-mac wants to merge 1 commit into
Open
Conversation
xiaoxiang781216
previously approved these changes
Jun 4, 2026
Add `EXTRA_LIB_DEPS` to the simulator nuttx target prerequisites. This lets Make notice when an extra application library, such as a Rust static library rebuilt by Cargo, has changed and ensures the final simulator binary is relinked. Signed-off-by: Shoji Tokunaga <toku@mac.com>
469627c to
8899369
Compare
Contributor
Author
|
In commit 8899369, I fixed a build error in sim/module. EXTRA_LIBS may contain both real library paths and linker options such as -ltest. If the whole variable is used as a Make prerequisite, Make treats -ltest as a file target and fails with “No rule to make target '-ltest'”. The new EXTRA_LIB_DEPS filters out option-style entries and expands only existing file paths with wildcard, so the nuttx target still relinks when real extra library files change without misinterpreting linker options as build targets. |
xiaoxiang781216
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This updates the simulator link rule so
nuttx$(EXEEXT)depends on$(EXTRA_LIBS).With this dependency in place, changes to extra application libraries, including Rust static libraries rebuilt by Cargo, cause the simulator
nuttxbinary to be relinked.Testing
I confirm that changes are verified on local setup and works as intended:
PR verification Self-Check