From 6e947c83b652d2e9aec8b106f9b171847a46f9dd Mon Sep 17 00:00:00 2001 From: Roy Buitenhuis Date: Tue, 11 Apr 2023 17:22:47 +0200 Subject: [PATCH] Move linker flags to build script. --- tests/riscv32/.cargo/config.toml | 4 ---- tests/riscv32/build.rs | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 tests/riscv32/build.rs diff --git a/tests/riscv32/.cargo/config.toml b/tests/riscv32/.cargo/config.toml index 1ffb0305d..58299b54e 100644 --- a/tests/riscv32/.cargo/config.toml +++ b/tests/riscv32/.cargo/config.toml @@ -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" diff --git a/tests/riscv32/build.rs b/tests/riscv32/build.rs new file mode 100644 index 000000000..e4a26c4a1 --- /dev/null +++ b/tests/riscv32/build.rs @@ -0,0 +1,8 @@ +use std::error::Error; + +fn main() -> Result<(), Box> { + println!("cargo:rustc-link-arg-bins=-Tmemory.x"); + println!("cargo:rustc-link-arg-bins=-Tlink.x"); + + Ok(()) +}