You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a binding to a file that should use header files from GCC.
I am passing arguments specifying the paths to the header files using clang_args(), however, for some reason this does not work.
let builder = bindgen::Builder::default()
.clang_args(["--target=x86_64-elf", "-ffreestanding", "-fno-builtin", "-nostdinc"])
.clang_args(&include_paths_with_isystem)
.header(buddy_alloc_header_path.display().to_string());
println!("cargo:warning=Include flags: {:?}", include_paths_with_isystem);
builder.generate()
.expect("Failed to generate binding");
Error
cargo:warning=Include flags: ["-isystem /home/oiu/dev/x86_64-elf-13.2.0-Linux-x86_64/bin/../lib/gcc/x86_64-elf/13.2.0/include", "-isystem /home/oui/dev/x86_64-elf-13.2.0-Linux-x86_64/bin/../lib/gcc/x86_64-elf/13.2.0/include-fixed"]
Failed to generate binding: ClangDiagnostic("/mnt/c/Rust/buddy_alloc_rs/buddy_alloc_sys/buddy_alloc_1.2.0_x86_64-elf-gcc_freestanding/buddy_alloc.h:19:10: fatal error: 'limits.h' file not found\n")
However, a direct clang call with the same flags works well.
I am trying to create a binding to a file that should use header files from GCC.
I am passing arguments specifying the paths to the header files using clang_args(), however, for some reason this does not work.
Error
However, a direct clang call with the same flags works well.
Of course, the limits.h file does exist
A direct call to the bindgen cli work fine.
The text was updated successfully, but these errors were encountered: