Skip to content

Commit

Permalink
fix(cli): Statically compile msvc runtime (#11769)
Browse files Browse the repository at this point in the history
* fix(cli): Statically compile msvc runtime

fixes #11642
ref swc-project/swc#7965

i only added it for x64 for now but we should monitor x32 (swc removed it for this one again) and aarch64 (swc never added it).
x32 is fairly rare as a dev system and aarch64 didn't seem much testing in general (as a dev system) so i'd prefer to wait and see if it's needed.

note that i don't know if any other tooling (rust etc) need the dyn runtime so that's also something to monitor

* 32bit and arm64
  • Loading branch information
FabianLars authored Dec 4, 2024
1 parent 9f51bbf commit 1f65fd2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/cli/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,10 @@ rustflags = ["-C", "target-feature=-crt-static"]

[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
[target.i686-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
[target.aarch64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]

0 comments on commit 1f65fd2

Please sign in to comment.