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] [target.riscv32imac-unknown-none-elf]
runner = "true" runner = "true"
rustflags = [
"-C", "link-arg=-Tmemory.x",
"-C", "link-arg=-Tlink.x",
]
[build] [build]
target = "riscv32imac-unknown-none-elf" 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(())
}