1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-23 16:36:18 +04:00
rCore/build.rs

16 lines
378 B
Rust
Raw Normal View History

2018-04-11 17:27:11 +04:00
extern crate cc;
use std::process::Command;
fn main() {
let output = Command::new("uname").output()
.expect("failed to get uname");
let compiler = match output.stdout.as_slice() {
b"Darwin\n" => "x86_64-elf-gcc",
b"Linux\n" => "gcc",
_ => panic!("unknown os")
};
cc::Build::new()
.compiler(compiler)
.file("src/test.c")
.compile("cobj");
}