apps/cmake: Fix aarch64 NuttX Rust target specs#3510
Open
toku-mac wants to merge 1 commit into
Open
Conversation
2 tasks
Add aarch64 Rust target specs for NuttX, including a Mach-O variant for macOS sim builds. Use the NuttX custom targets instead of aarch64-apple-darwin so Rust std is built with target_os=nuttx while still producing link-compatible objects for sim. Signed-off-by: Shoji Tokunaga <toku@mac.com>
77b62fc to
6e58319
Compare
Contributor
Author
|
Since the PR on the nuttx git repository has been merged into master, I've decided not to move the |
Contributor
but it's better to create a new patch to put all json config in one place. |
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
Previously, aarch64 sim builds on macOS used aarch64-apple-darwin,
which sets target_os=macos and causes NuttX-specific cfg guards to be silently skipped.
This PR adds two custom Rust target JSON files:
Rust.mk and cmake/nuttx_add_rust.cmake are updated to select the
appropriate target.
Depends on the corresponding nuttx-side PR. #18992
Impact
Allows proper building of sim on Apple Silicon Macs and aarch64 Linux.
(Support for Intel Macs will be considered separately.)
Testing
I confirm that changes are verified on local setup and works as intended:
PR verification Self-Check