diff --git a/crates/algorithms/build.rs b/crates/algorithms/build.rs index 2f02505..6a648c8 100755 --- a/crates/algorithms/build.rs +++ b/crates/algorithms/build.rs @@ -30,17 +30,16 @@ fn main() { let mut cmd = std::process::Command::new("ceedling.bat"); #[cfg(not(target_os = "windows"))] let mut cmd = std::process::Command::new("ceedling"); - cmd.arg("release"); let arch = env("CARGO_CFG_TARGET_ARCH"); let pw = env("CARGO_CFG_TARGET_POINTER_WIDTH"); let os = env("CARGO_CFG_TARGET_OS"); - if arch == "arm" && pw == "32" && os == "none" && !cfg!(test) { + if arch == "arm" && pw == "32" && os == "none" { cmd.env("CC", "arm-none-eabi-gcc") .env("AR", "arm-none-eabi-ar") .env("CC_FLAGS", "-march=armv6-m"); - } else if os == "linux" || os == "windows" || cfg!(test) { + } else if os == "linux" || os == "windows" { cmd.env("CC", "gcc").env("AR", "ar"); } else { panic!("Unsupported build target") @@ -48,6 +47,7 @@ fn main() { println!("Cwd: {}", std::env::current_dir().unwrap().display()); let status = cmd + .arg("release") .current_dir("./algorithms-c") .status() .expect("could not make c stuff");