diff options
author | Austin Wise <AustinWise@gmail.com> | 2020-06-09 14:18:49 -0700 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2021-05-31 21:51:18 -0400 |
commit | 46d0130597a8340c19fdd41b107c209653451698 (patch) | |
tree | ebeaf4d779e897ca25b538e0b7fc9d7daea2afc1 /.cargo | |
parent | 7534d5144f5c5e89d67c791e663cdc0bee069b0e (diff) |
cargo: statically link binary on Windows/MSVC
Before this change, rg.exe depended on vcruntime140.dll, which does not
exist on a fresh install of Windows.
Closes #1613
Diffstat (limited to '.cargo')
-rw-r--r-- | .cargo/config.toml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..7db936b4 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,8 @@ +# On Windows MSVC, statically link the C runtime so that the resulting EXE does +# not depend on the vcruntime DLL. +# +# See: https://github.com/BurntSushi/ripgrep/pull/1613 +[target.x86_64-pc-windows-msvc] +rustflags = ["-C", "target-feature=+crt-static"] +[target.i686-pc-windows-msvc] +rustflags = ["-C", "target-feature=+crt-static"] |