Skip to content

Commit 9bda683

Browse files
Respond to PR comments. Correctly specify the profile.rustflags support in Cargo.
1 parent 8544788 commit 9bda683

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

text/0000-rustflags.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ specified in the manifest file matches the target triple used as the host or tar
4040

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

4648
# Guide-level explanation
4749
[guide-level-explanation]: #guide-level-explanation

0 commit comments

Comments
 (0)