mirror of https://github.com/m-labs/artiq.git
libboard: use libbuild_artiq
This commit is contained in:
parent
c5fe2799cf
commit
091bb28043
|
@ -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 }
|
||||||
|
|
||||||
|
|
|
@ -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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue