mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
so...i think in this case, maybe the build.rs wasn't formatted? it got picked up the second time when i ran the command. in the case of pddbkey.rs, I think the changes made by rustfmt were so dramatic it required two passes for it to become clean.
24 lines
630 B
Rust
24 lines
630 B
Rust
extern crate cc;
|
|
|
|
use std::env::set_var;
|
|
|
|
fn main() {
|
|
set_var("CC", "riscv64-unknown-elf-gcc"); // set the compiler to what's installed on the system
|
|
|
|
let ffi_srcs = vec!["ffi/ffi.c", "ffi/libc.c", "ffi/libc_split.c", "ffi/scanf.c"];
|
|
let ffi_includes = vec!["./"];
|
|
|
|
let mut base_config = cc::Build::new();
|
|
base_config.target("riscv32imac-unknown-none-elf");
|
|
|
|
for inc in ffi_includes {
|
|
base_config.include(inc);
|
|
}
|
|
|
|
for src in ffi_srcs {
|
|
base_config.file(src);
|
|
}
|
|
base_config.define("XOUS", None);
|
|
base_config.define("NO_STD", None);
|
|
base_config.compile("libffi.a");
|
|
}
|