From 5d5e0a79f038335c8f8228a22baa886d9047f4c0 Mon Sep 17 00:00:00 2001 From: itowlson Date: Mon, 16 Dec 2024 14:09:01 +1300 Subject: [PATCH] Statically link runtime into Windows binary Signed-off-by: itowlson --- .cargo/config.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 00b96c3e8b..c8908a3d6c 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -9,3 +9,6 @@ rustflags = ["-C", "target-feature=+fp16", "-C", "target-feature=+crt-static", " [target.x86_64-unknown-linux-musl] rustflags = ["-C", "target-feature=+crt-static", "-C", "link-self-contained=yes"] + +[target.'cfg(all(windows, target_env = "msvc"))'] +rustflags = ["-C", "target-feature=+crt-static"]