Browse Source

add libbuild_zynq

Reviewed-on: M-Labs/artiq-zynq#141
Co-authored-by: mwojcik <mw@m-labs.hk>
Co-committed-by: mwojcik <mw@m-labs.hk>
exception
mwojcik 1 year ago committed by sb10q
parent
commit
e241957419
  1. 8
      src/libbuild_zynq/Cargo.toml
  2. 13
      src/libbuild_zynq/lib.rs

8
src/libbuild_zynq/Cargo.toml

@ -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

@ -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());
}
}
Loading…
Cancel
Save