forked from M-Labs/artiq
firmware: simplify ksupport build script.
This commit is contained in:
parent
b29e2d5bfe
commit
209be73204
1
artiq/firmware/Cargo.lock
generated
1
artiq/firmware/Cargo.lock
generated
@ -52,6 +52,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"alloc_none 0.0.0",
|
||||
"board 0.0.0",
|
||||
"build_artiq 0.0.0",
|
||||
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"std_artiq 0.0.0",
|
||||
]
|
||||
|
@ -9,6 +9,9 @@ name = "ksupport"
|
||||
path = "lib.rs"
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[build-dependencies]
|
||||
build_artiq = { path = "../libbuild_artiq" }
|
||||
|
||||
[dependencies]
|
||||
alloc_none = { path = "../liballoc_none" }
|
||||
std_artiq = { path = "../libstd_artiq" }
|
||||
|
@ -1,17 +1,6 @@
|
||||
use std::env;
|
||||
use std::path::Path;
|
||||
use std::io::{BufRead, BufReader};
|
||||
use std::fs::File;
|
||||
extern crate build_artiq;
|
||||
|
||||
fn main() {
|
||||
let out_dir = env::var("BUILDINC_DIRECTORY").unwrap();
|
||||
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());
|
||||
}
|
||||
|
||||
build_artiq::misoc_registers();
|
||||
println!("cargo:rustc-cfg={}", "ksupport");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user