diff options
| author | Roy Buitenhuis <[email protected]> | 2023-04-11 17:22:47 +0200 |
|---|---|---|
| committer | Roy Buitenhuis <[email protected]> | 2023-04-11 17:22:47 +0200 |
| commit | 6e947c83b652d2e9aec8b106f9b171847a46f9dd (patch) | |
| tree | 0ef16aa6e98eeb2de2dd218ccec228317debefbf | |
| parent | e18380195732c5ca339257521dc2fc9add5ac1ba (diff) | |
Move linker flags to build script.
| -rw-r--r-- | tests/riscv32/.cargo/config.toml | 4 | ||||
| -rw-r--r-- | tests/riscv32/build.rs | 8 |
2 files changed, 8 insertions, 4 deletions
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 @@ | |||
| 1 | [target.riscv32imac-unknown-none-elf] | 1 | [target.riscv32imac-unknown-none-elf] |
| 2 | runner = "true" | 2 | runner = "true" |
| 3 | rustflags = [ | ||
| 4 | "-C", "link-arg=-Tmemory.x", | ||
| 5 | "-C", "link-arg=-Tlink.x", | ||
| 6 | ] | ||
| 7 | 3 | ||
| 8 | [build] | 4 | [build] |
| 9 | target = "riscv32imac-unknown-none-elf" | 5 | 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 @@ | |||
| 1 | use std::error::Error; | ||
| 2 | |||
| 3 | fn main() -> Result<(), Box<dyn Error>> { | ||
| 4 | println!("cargo:rustc-link-arg-bins=-Tmemory.x"); | ||
| 5 | println!("cargo:rustc-link-arg-bins=-Tlink.x"); | ||
| 6 | |||
| 7 | Ok(()) | ||
| 8 | } | ||
