Skip to content

Commit

Permalink
Updated bindgen to latest to support remapping of riscv triple naming.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbohm committed Sep 10, 2023
1 parent 8c786d1 commit 9aa9f08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/nickray/littlefs2-sys"
cty = "0.2.1"

[build-dependencies]
bindgen = { version = "0.56.0", default-features = false , features = ["runtime"] }
bindgen = { version = "0.66.1", default-features = false , features = ["runtime"] }
cc = "1"

[features]
Expand Down
5 changes: 1 addition & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::path::PathBuf;

fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut builder = cc::Build::new();
let target = env::var("TARGET")?;
let builder = builder
.flag("-std=c11")
.flag("-DLFS_NO_MALLOC")
Expand All @@ -12,8 +11,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.flag("-DLFS_NO_ERROR")
.file("littlefs/lfs.c")
.file("littlefs/lfs_util.c")
.file("string.c")
;
.file("string.c");

#[cfg(not(feature = "assertions"))]
let builder = builder.flag("-DLFS_NO_ASSERT");
Expand All @@ -25,7 +23,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {

let bindings = bindgen::Builder::default()
.header("littlefs/lfs.h")
.clang_arg(format!("--target={}", target))
.use_core()
.ctypes_prefix("cty")
.rustfmt_bindings(true)
Expand Down

0 comments on commit 9aa9f08

Please sign in to comment.