forked from M-Labs/artiq
1
0
Fork 0

libboard: use libbuild_artiq

This commit is contained in:
Sebastien Bourdeauducq 2017-09-05 21:13:04 +08:00
parent c5fe2799cf
commit 091bb28043
2 changed files with 5 additions and 12 deletions

View File

@ -8,6 +8,9 @@ build = "build.rs"
name = "board" name = "board"
path = "lib.rs" path = "lib.rs"
[build-dependencies]
build_artiq = { path = "../libbuild_artiq" }
[dependencies] [dependencies]
log = { version = "0.3", default-features = false } log = { version = "0.3", default-features = false }

View File

@ -1,15 +1,5 @@
use std::env; extern crate build_artiq;
use std::path::Path;
use std::io::{BufRead, BufReader};
use std::fs::File;
fn main() { fn main() {
let out_dir = env::var("BUILDINC_DIRECTORY").unwrap(); build_artiq::misoc_cfg();
let cfg_path = Path::new(&out_dir).join("generated").join("rust-cfg");
println!("cargo:rerun-if-changed={}", cfg_path.to_str().unwrap());
let f = BufReader::new(File::open(&cfg_path).unwrap());
for line in f.lines() {
println!("cargo:rustc-cfg={}", line.unwrap());
}
} }