From 9bda683d85ab7ac2d008cbb53a595bef61bb0194 Mon Sep 17 00:00:00 2001 From: ridwanabdillahi <91507758+ridwanabdillahi@users.noreply.github.com> Date: Tue, 6 Sep 2022 15:46:11 -0700 Subject: [PATCH] Respond to PR comments. Correctly specify the `profile.rustflags` support in Cargo. --- text/0000-rustflags.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/text/0000-rustflags.md b/text/0000-rustflags.md index ba8a8193f5f..a0f1776e1a1 100644 --- a/text/0000-rustflags.md +++ b/text/0000-rustflags.md @@ -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