Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
makefiles: Align cargo-info output with what happens in the build system
Browse files Browse the repository at this point in the history
This simplifies the explanation of what might need adjustments depending
on which cargo command is invoked.
chrysn committed Aug 21, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
miri64 Martine Lenders
1 parent 087703e commit 0f8535e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions makefiles/info.inc.mk
Original file line number Diff line number Diff line change
@@ -250,9 +250,10 @@ info-rust:
cargo version
c2rust --version
@echo "To use this setup of Rust in an IDE, add these command line arguments to the \`cargo check\` or \`rust-analyzer\`:"
@echo " --target $(RUST_TARGET) --profile $(CARGO_PROFILE) $(CARGO_OPTIONS)"
@echo " --profile $(CARGO_PROFILE) $(CARGO_OPTIONS)"
@echo "and export these environment variables:"
@echo " CARGO_BUILD_TARGET=\"$(RUST_TARGET)\""
@echo " RIOT_COMPILE_COMMANDS_JSON=\"$(CARGO_COMPILE_COMMANDS)\""
@echo " RIOTBUILD_CONFIG_HEADER_C=\"$(RIOTBUILD_CONFIG_HEADER_C)\""
@echo "You can also call cargo related commands with \`make cargo-command CARGO_COMMAND=\"cargo check\"\`."
@echo "Beware that the way the profile and other flags are passed in is not consistent across cargo commands, so adding \`--profile $(CARGO_PROFILE)\` or other flags from above as part of CARGO_COMMAND may be necessary."
@echo "Beware that the way command line arguments are passed in is not consistent across cargo commands, so adding \`--profile $(CARGO_PROFILE)\` or other flags from above as part of CARGO_COMMAND may be necessary."

0 comments on commit 0f8535e

Please sign in to comment.