mirror of
https://github.com/trussed-dev/littlefs2-sys.git
synced 2026-06-20 04:16:31 -07:00
Fail directly if TARGET were missing
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
use std::env;
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut builder = cc::Build::new();
|
||||
let target = env::var("TARGET").unwrap_or("".to_string());
|
||||
let target = env::var("TARGET")?;
|
||||
let builder = builder
|
||||
.flag("-std=c11")
|
||||
.flag("-DLFS_NO_MALLOC")
|
||||
@@ -36,4 +36,6 @@ fn main() {
|
||||
bindings
|
||||
.write_to_file(out_path.join("bindings.rs"))
|
||||
.expect("Couldn't write bindings!");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user