Add build script to set target configuration variable
This commit is contained in:
9
src/build.rs
Normal file
9
src/build.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// Set the target config variable to the target triple of the current build
|
||||
// This is used so we can determine the target triple at compile time
|
||||
// See https://stackoverflow.com/a/51311222
|
||||
fn main() {
|
||||
println!(
|
||||
"cargo:rustc-cfg=target=\"{}\"",
|
||||
std::env::var("TARGET").unwrap()
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user