From 990bb7c8d92a7cb06156c287e02e42077ec45842 Mon Sep 17 00:00:00 2001 From: Jose Quintana <1700322+joseluisq@users.noreply.github.com> Date: Mon, 13 Nov 2023 02:41:44 +0100 Subject: [PATCH] refactor: statically link the c runtime for windows msvc x86 (#291) i686 (before) $ ldd static-web-server.exe ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffc41ff0000) ntdll.dll => /c/Windows/SyChpe32/ntdll.dll (0x77700000) wow64.dll => /c/Windows/System32/wow64.dll (0x7ffc3fa80000) wow64base.dll => /c/Windows/System32/wow64base.dll (0x7ffc3e800000) wow64win.dll => /c/Windows/System32/wow64win.dll (0x7ffc3f5d0000) wow64con.dll => /c/Windows/System32/wow64con.dll (0x7ffc3fe50000) i686 (after) $ ldd static-web-server.exe ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffe74db0000) KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffe73990000) KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffe72b10000) advapi32.dll => /c/Windows/System32/advapi32.dll (0x7ffe72f30000) msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ffe74580000) sechost.dll => /c/Windows/System32/sechost.dll (0x7ffe74b80000) RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ffe74450000) ws2_32.dll => /c/Windows/System32/ws2_32.dll (0x7ffe74c20000) bcrypt.dll => /c/Windows/System32/bcrypt.dll (0x7ffe72ae0000) CRYPTBASE.DLL => /c/Windows/SYSTEM32/CRYPTBASE.DLL (0x7ffe71d70000) --- .cargo/config.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index ce61f87..5d51715 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -7,3 +7,5 @@ protocol = "sparse" rustflags = ["-C", "target-feature=+crt-static"] [target.aarch64-pc-windows-msvc] rustflags = ["-C", "target-feature=+crt-static"] +[target.i686-pc-windows-msvc] +rustflags = ["-C", "link-arg=libvcruntime.lib"] -- libgit2 1.7.2