Skip to content

Commit

Permalink
Respond to PR comments. Correctly specify the profile.rustflags sup…
Browse files Browse the repository at this point in the history
…port in Cargo.
  • Loading branch information
ridwanabdillahi committed Sep 6, 2022
1 parent 8544788 commit 9bda683
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions text/0000-rustflags.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ specified in the manifest file matches the target triple used as the host or tar

Another supported way of setting rustflags in cargo is the `profile.rustflags` manifest key that can be set in a `Cargo.toml`. This
works in a slightly different manner than the ways mentioned previously in that it is appended to the set of rustflags calculated from
the environment variables and cargo config settings. It still has the same limitation in that it is applied to all invocations of rustc
including dependencies.
the environment variables and cargo config settings. This also has support for crate specific rustflags on a per profile basis. This
currently depends on the [profile-rustflags](https://doc.rust-lang.org/cargo/reference/unstable.html#profile-rustflags-option) unstable
option. This restricts setting rustflags for crates to the profile requested. The `--rustflags` option works for the current crate
regardless of the currently requested profile.

# Guide-level explanation
[guide-level-explanation]: #guide-level-explanation
Expand Down

0 comments on commit 9bda683

Please sign in to comment.