From 7cb95dd470ba64c423b6f175f000e93dc7cc4778 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Fri, 8 Dec 2023 18:34:27 +0000 Subject: [PATCH] Use `target.'cfg(all())'.rustflags` in template `target.'cfg(all())'.linker` is apparently a recent addition: https://github.com/rust-lang/cargo/pull/12535 --- internal/template/.cargo/config.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/template/.cargo/config.toml b/internal/template/.cargo/config.toml index 93dceb699..226eca535 100644 --- a/internal/template/.cargo/config.toml +++ b/internal/template/.cargo/config.toml @@ -1,2 +1,6 @@ [target.'cfg(all())'] -linker = "dylint-link" +rustflags = ["-C", "linker=dylint-link"] + +# For Rust versions 1.74.0 and onward, the following alternative can be used +# (see https://github.com/rust-lang/cargo/pull/12535): +# linker = "dylint-link"