From f927aa5788aef7c5a1595b2dc4879db82725f8c6 Mon Sep 17 00:00:00 2001 From: Kevin Nakamura Date: Sat, 5 Jul 2025 12:03:14 +0000 Subject: [PATCH] Statically link MSVC runtime, removing the need to install the redistributable (#4166) * Statically link MSVC runtime, removing the need to install the redistributable. * CONTRIBUTORS I've already contributed and added my email, but the last commit got mangled. --- .cargo/config.toml | 3 +++ CONTRIBUTORS | 1 + 2 files changed, 4 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 3fbb3be1b..49aaa3a6c 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -10,3 +10,6 @@ PYTHONDONTWRITEBYTECODE = "1" # prevent junk files on Windows [term] color = "always" + +[target.'cfg(all(target_env = "msvc", target_os = "windows"))'] +rustflags = ["-C", "target-feature=+crt-static"] diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 327e37f27..c22bc764a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -234,6 +234,7 @@ Emmanuel Ferdman Sunong2008 Marvin Kopf Kevin Nakamura + ******************** The text of the 3 clause BSD license follows: