Няма описание
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.

123456789101112131415
  1. use std::env;
  2. use std::fs;
  3. use std::io::Write;
  4. use std::path::PathBuf;
  5. fn main() {
  6. // Put the linker script somewhere the linker can find it
  7. let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
  8. fs::File::create(out_dir.join("memory.x"))
  9. .unwrap()
  10. .write_all(include_bytes!("memory.x"))
  11. .unwrap();
  12. println!("cargo:rustc-link-search={}", out_dir.display());
  13. println!("cargo:rerun-if-changed=memory.x");
  14. }