Remove baremetal cfg detection in build script

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
This commit is contained in:
Jean-Pierre De Jesus DIAZ 2022-10-25 13:24:59 +02:00
parent 0ec75861e6
commit 14b92dede4
No known key found for this signature in database
GPG key ID: 6279AEC20A9524EC

View file

@ -6,19 +6,8 @@ use std::path::PathBuf;
fn main() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
let target = env::var("TARGET").unwrap();
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
let name = env::var("CARGO_PKG_NAME").unwrap();
// If we're not running on a desktop-class operating system, emit the "baremetal"
// config setting. This will enable software to do tasks such as
// managing memory.
if target_os == "none" {
println!("Target {} is bare metal", target);
println!("cargo:rustc-cfg=baremetal");
} else {
println!("Target {} is NOT bare metal", target);
}
if target.starts_with("riscv") {
fs::copy(
format!("bin/{}.a", target),