mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2024-12-12 19:18:24 +02:00
c33f623719
It looks like the musl target will, at some point, default to be dynamically linked. This config knob should make it so that it's always statically linked. Ref https://github.com/rust-lang/compiler-team/issues/422 Ref https://github.com/rust-lang/compiler-team/issues/422#issuecomment-812135847
22 lines
861 B
TOML
22 lines
861 B
TOML
# 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"]
|
|
|
|
# Do the same for MUSL targets. At the time of writing (2023-10-23), this is
|
|
# the default. But the plan is for the default to change to dynamic linking.
|
|
# The whole point of MUSL with respect to ripgrep is to create a fully
|
|
# statically linked executable.
|
|
#
|
|
# See: https://github.com/rust-lang/compiler-team/issues/422
|
|
# See: https://github.com/rust-lang/compiler-team/issues/422#issuecomment-812135847
|
|
[target.x86_64-unknown-linux-musl]
|
|
rustflags = [
|
|
"-C", "target-feature=+crt-static",
|
|
"-C", "link-self-contained=yes",
|
|
]
|