1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles/doc: Clarify that CARGO_OPTIONS is only used for cargo build

The options passed to cargo are not universal, and thus can not apply to
all commands as was previously documented.
This commit is contained in:
chrysn 2024-08-21 21:51:02 +02:00
parent d260ec88a6
commit a5c7705e1f
2 changed files with 4 additions and 3 deletions

View File

@ -30,7 +30,7 @@ CARGO_TARGET_DIR = $(BINDIR)/target
# directory with the same name as the profile". # directory with the same name as the profile".
CARGO_LIB = $(CARGO_TARGET_DIR)/$(RUST_TARGET)/$(patsubst test,debug,$(patsubst dev,debug,$(patsubst bench,release,${CARGO_PROFILE})))/lib$(APPLICATION_RUST_MODULE).a CARGO_LIB = $(CARGO_TARGET_DIR)/$(RUST_TARGET)/$(patsubst test,debug,$(patsubst dev,debug,$(patsubst bench,release,${CARGO_PROFILE})))/lib$(APPLICATION_RUST_MODULE).a
# Options passed into all Cargo commands, in particular to the build command. # Options passed into the Cargo build command.
# #
# Most of these are populated by RIOT modules that are backed by Rust. Popular # Most of these are populated by RIOT modules that are backed by Rust. Popular
# options added by the user are `-Zbuild-std=core` (only available on nightly) # options added by the user are `-Zbuild-std=core` (only available on nightly)

View File

@ -250,8 +250,9 @@ info-rust:
cargo version cargo version
c2rust --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 "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)" @echo " --target $(RUST_TARGET) --profile $(CARGO_PROFILE) $(CARGO_OPTIONS)"
@echo "and export these environment variables:" @echo "and export these environment variables:"
@echo " RIOT_COMPILE_COMMANDS_JSON=\"$(CARGO_COMPILE_COMMANDS)\"" @echo " RIOT_COMPILE_COMMANDS_JSON=\"$(CARGO_COMPILE_COMMANDS)\""
@echo " RIOTBUILD_CONFIG_HEADER_C=\"$(RIOTBUILD_CONFIG_HEADER_C)\"" @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"\`; beware that the way the profile is passed in is not consistent across cargo commands, and adding \`--profile $(CARGO_PROFILE)\` as part of CARGO_COMMAND may be necessary." @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."