From 462e84f3515ead140a20efe4a0a1df276922e936 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 2 Feb 2020 09:33:14 -0800 Subject: [PATCH] build static on windows for static openssl linkage openssl-src will link openssl statically if the target feature is set to crt-static, so let's do that. --- .cargo/config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.cargo/config b/.cargo/config index 6569cdbc4..fe26b9b0e 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,3 +1,9 @@ [target.x86_64-pc-windows-gnu] linker = "x86_64-w64-mingw32-gcc" ar = "x86_64-w64-mingw32-gcc-ar" + +# We need openssl to be statically linked on windows to avoid madness, +# and openssl-src does that based on the crt-static feature being +# enabled for the target, so let's turn that on here. +[target.x86_64-pc-windows-msvc] +rustflags = "-C target-feature=+crt-static"