mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-15 16:58:02 +00:00

Turns out Cargo doesn't automatically set `TARGET` for rustc invocations so carry it forward manually from the build script over to the rustc invocation.
9 lines
123 B
Rust
9 lines
123 B
Rust
use std::env;
|
|
|
|
fn main() {
|
|
println!(
|
|
"cargo:rustc-env=TARGET={}",
|
|
env::var("TARGET").unwrap()
|
|
);
|
|
}
|