apps/tools: Make hello_rust_cargo buildable with make#3501
Merged
Conversation
* Add JSON specification compatibility flag. * Add Rust target conversion support for `aarch64` on macOS. Signed-off-by: Shoji Tokunaga <toku@mac.com>
xiaoxiang781216
approved these changes
May 26, 2026
Member
|
@no1wudi Could you review this PR? Thanks :-) |
2 tasks
no1wudi
approved these changes
May 26, 2026
lupyuen
approved these changes
May 26, 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
Fix the Make-based build for Rust-enabled
sim:nshconfigurations.This change addresses two Make/Cargo issues:
Add the missing Apple Silicon macOS Rust target mapping
When building
sim:nshwith Make on an ARM64 macOS host,LLVM_ARCHTYPEis set toaarch64. However,apps/tools/Rust.mkdid not handleaarch64inRUST_TARGET_TRIPLE, so Cargo was invoked with an empty--targetargument:The Make build now maps this case to the same target used by the CMake Rust helper:
aarch64-apple-darwinPass
-Zjson-target-specto CargoThe Rust build uses JSON target specifications for NuttX targets such as the simulator targets under
apps/tools/. Cargo requires-Zjson-target-specwhen building with these JSON target files.Impact
Testing
I confirm that changes are verified on local setup and works as intended:
Configuration:
Testing logs before change:
Testing logs after change:
PR verification Self-Check