DRTIO port - libbuild_zynq #141

Merged
sb10q merged 1 commits from mwojcik/artiq-zynq:drtio_libbuild into master 2021-10-06 16:16:49 +08:00
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,8 @@
[package]
authors = ["M-Labs"]
name = "build_zynq"
version = "0.0.0"
[lib]
name = "build_zynq"
path = "lib.rs"

13
src/libbuild_zynq/lib.rs Normal file
View File

@ -0,0 +1,13 @@
use std::fs::File;
use std::io::{BufRead, BufReader};
pub fn cfg() {
// Handle rustc-cfg file
let cfg_path = "../../build/rustc-cfg";
println!("cargo:rerun-if-changed={}", cfg_path);
let f = BufReader::new(File::open(cfg_path).unwrap());
for line in f.lines() {
println!("cargo:rustc-cfg={}", line.unwrap());
}
}