Move linker flags to build script.

This commit is contained in:
Roy Buitenhuis 2023-04-11 17:22:47 +02:00
parent e183801957
commit 6e947c83b6
2 changed files with 8 additions and 4 deletions

View file

@ -1,9 +1,5 @@
[target.riscv32imac-unknown-none-elf]
runner = "true"
rustflags = [
"-C", "link-arg=-Tmemory.x",
"-C", "link-arg=-Tlink.x",
]
[build]
target = "riscv32imac-unknown-none-elf"

8
tests/riscv32/build.rs Normal file
View file

@ -0,0 +1,8 @@
use std::error::Error;
fn main() -> Result<(), Box<dyn Error>> {
println!("cargo:rustc-link-arg-bins=-Tmemory.x");
println!("cargo:rustc-link-arg-bins=-Tlink.x");
Ok(())
}