fix(cli): Statically compile msvc runtime (#11769)

* fix(cli): Statically compile msvc runtime

fixes https://github.com/tauri-apps/tauri/issues/11642
ref https://github.com/swc-project/swc/pull/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
This commit is contained in:
Fabian-Lars 2024-12-04 19:32:09 +01:00 committed by GitHub
parent 9f51bbf1de
commit 1f65fd2bb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"]