From 55928a6225d57cf7f84551e8b594cba6b603a012 Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Fri, 16 May 2025 02:23:27 +0100 Subject: [PATCH] fix: Update cargo's config to use the new linker parameter (#100) Since rust v1.74, the linker can be selected without using rustflags. This plays nicer with `RUSTFLAGS`. --- .cargo/config.toml | 2 +- cargo-generate/config.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index a565984..fe36bd6 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -5,8 +5,8 @@ runner = "probe-rs run --chip RP2040 --protocol swd" # runner = "elf2uf2-rs -d" +linker = "flip-link" rustflags = [ - "-C", "linker=flip-link", "-C", "link-arg=--nmagic", "-C", "link-arg=-Tlink.x", "-C", "link-arg=-Tdefmt.x", diff --git a/cargo-generate/config.toml b/cargo-generate/config.toml index 0e61763..74b239c 100644 --- a/cargo-generate/config.toml +++ b/cargo-generate/config.toml @@ -15,8 +15,8 @@ runner = "{{ flash_method_custom }}" {%- endif -%} {%- endcase %} +linker = "flip-link" rustflags = [ - "-C", "linker=flip-link", "-C", "link-arg=--nmagic", "-C", "link-arg=-Tlink.x", "-C", "link-arg=-Tdefmt.x",