Skip to content

Commit a07ad51

Browse files
authored
Merge pull request #1891 from FidelSch/c-static-link
config: statically link C runtime for Windows MSVC
2 parents 40d8eb3 + 6067f72 commit a07ad51

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.cargo/config.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# On Windows MSVC, statically link the C runtime so that the resulting EXE does
2+
# not depend on the vcruntime DLL.
3+
#
4+
# See: https://github.com/sharkdp/fd/issues/1874
5+
6+
[target.x86_64-pc-windows-msvc]
7+
rustflags = ["-C", "target-feature=+crt-static"]
8+
[target.i686-pc-windows-msvc]
9+
rustflags = ["-C", "target-feature=+crt-static"]

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
## Changes
1919

2020
- Minimum required rust version has been increased to 1.90.0. Notably, this means dropping fully support for intel Mac and Windows 7.
21+
- Statically link the CRT for MSVC builds via Cargo config to avoid runtime DLL dependencies, see #1874 (@FidelSch)
2122

2223

2324
## Other

0 commit comments

Comments
 (0)