Set CFG_RELEASE for tools in bootstrap/tool.rs
Since rustc-ap-* v659 we now need to set CFG_RELEASE for rustc-ap-rustc_attr for `#[cfg(version(...))]` to work. Co-authored-by: Eric Huss <ehuss@users.noreply.github.com>
This commit is contained in:
parent
84eae777c1
commit
489b7e4123
@ -252,6 +252,10 @@ pub fn prepare_tool_cargo(
|
||||
// own copy
|
||||
cargo.env("LZMA_API_STATIC", "1");
|
||||
|
||||
// CFG_RELEASE is needed by rustfmt (and possibly other tools) which
|
||||
// import rustc-ap-rustc_attr which requires this to be set for the
|
||||
// `#[cfg(version(...))]` attribute.
|
||||
cargo.env("CFG_RELEASE", builder.rust_release());
|
||||
cargo.env("CFG_RELEASE_CHANNEL", &builder.config.channel);
|
||||
cargo.env("CFG_VERSION", builder.rust_version());
|
||||
cargo.env("CFG_RELEASE_NUM", channel::CFG_RELEASE_NUM);
|
||||
|
Loading…
x
Reference in New Issue
Block a user