build files copied from build_misoc

This commit is contained in:
mwojcik 2021-07-23 14:59:29 +02:00
parent 3af0ee6242
commit a06b485b67
3 changed files with 30 additions and 2 deletions

View File

@ -1,10 +1,13 @@
[workspace] [workspace]
members = [ members = [
"libboard_zynq",
"libc", "libc",
"libdyld", "libdyld",
"libdwarf", "libdwarf",
"libio",
"libunwind", "libunwind",
"runtime", "runtime",
"satman"
] ]
[profile.release] [profile.release]

View File

@ -0,0 +1,15 @@
use std::env;
use std::fs::File;
use std::io::{BufRead, BufReader};
use std::path::Path;
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());
}
}

View File

@ -1,5 +1,15 @@
extern crate build_misoc; use std::env;
use std::fs::File;
use std::io::{BufRead, BufReader};
use std::path::Path;
fn main() { fn main() {
build_misoc::cfg(); // <- port - see if it's necessary, how necessary, maybe move to board_artiqzync 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());
}
} }