mirror of
https://github.com/trussed-dev/littlefs2-sys.git
synced 2026-06-20 04:16:31 -07:00
add target arg for clang
This commit is contained in:
committed by
Nicolas Stalder
parent
97a24b2211
commit
528616927a
@@ -3,6 +3,7 @@ use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
let mut builder = cc::Build::new();
|
||||
let target = env::var("TARGET").unwrap_or("".to_string());
|
||||
let builder = builder
|
||||
.flag("-std=c11")
|
||||
.flag("-DLFS_NO_MALLOC")
|
||||
@@ -24,6 +25,7 @@ fn main() {
|
||||
|
||||
let bindings = bindgen::Builder::default()
|
||||
.header("littlefs/lfs.h")
|
||||
.clang_arg(format!("--target={}", target))
|
||||
.use_core()
|
||||
.ctypes_prefix("cty")
|
||||
.rustfmt_bindings(true)
|
||||
|
||||
Reference in New Issue
Block a user