Closed Tirka closed 2 years ago
rustup install 1.54.0 rustup install 1.55.0
git clone https://github.com/Tirka/rustflags-buildrs.git cd ./rustflags-buildrs
RUSTFLAGS="-C target-cpu=skylake" FOO="bar" cargo +1.54.0 build -vv
Output:
[rustflags-buildrs 0.1.0] RUSTFLAGS=Some("-C target-cpu=skylake") [rustflags-buildrs 0.1.0] FOO=Some("bar")
cargo clean
RUSTFLAGS="-C target-cpu=skylake" FOO="bar" cargo +1.55.0 build -vv
[rustflags-buildrs 0.1.0] RUSTFLAGS=None [rustflags-buildrs 0.1.0] FOO=Some("bar")
It looks like RUSTFLAGS environment variable is not available within build.rs script since 1.55.0 and I can't find any info related to this new behavior in the changelog.
RUSTFLAGS
build.rs
1.55.0
@ehuss could you transfer this to rust-lang/cargo?
Sure
Transferred to https://github.com/rust-lang/cargo/issues/10111
Install Rust Stable 1.54 and 1.55
Clone Minimal Reproducible Example
Build with Cargo and Rust Stable 1.54.0
Output:
Cargo clean
Build with Cargo and Rust Stable 1.55.0
Output:
It looks like
RUSTFLAGS
environment variable is not available withinbuild.rs
script since1.55.0
and I can't find any info related to this new behavior in the changelog.