Next-generation FPGA SoC toolkit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
601 B

use std::env;
use std::fs::File;
use std::io::Write;
use std::path::Path;
/// Put the linker script somewhere the linker can find it.
fn main() {
let out_dir = env::var("OUT_DIR").expect("No out dir");
let dest_path = Path::new(&out_dir);
let mut f = File::create(&dest_path.join("memory.x"))
.expect("Could not create file");
.expect("Could not write file");
println!("cargo:rustc-link-search={}", dest_path.display());