Skip to content

Commit

Permalink
Statically link to the C runtime in MSVC (#670)
Browse files Browse the repository at this point in the history
Javy version 1.4.0 statically linked to the C runtime. Such version was
built with Rust 1.75.

Javy version 2.0.0, built with Rust 1.79.0, which doesn't perform static
linking by default. This commit adds a directive to preserve the same
behavior as in v 1.4.0.
  • Loading branch information
saulecabrera authored Jun 18, 2024
1 parent 16fcc96 commit 0fa9b05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
# https://doc.rust-lang.org/cargo/reference/config.html
[target.wasm32-wasi]
rustflags = ["-C", "target-feature=+simd128"]

# We want to ensure that all the MSVC dependencies are statically resolved and
# included in the final CLI binary.
# Ref: https://github.com/rust-lang/rust/pull/122268
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]

0 comments on commit 0fa9b05

Please sign in to comment.