Skip to content

Commit 2e61aba

Browse files
authored
feat(cli): allow dynamic link vcruntime, closes #4565 (#4601)
1 parent 038c2cc commit 2e61aba

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"cli.rs": patch
3+
"cli.js": patch
4+
---
5+
6+
Skip the static link of the `vcruntime140.dll` if the `STATIC_VCRUNTIME` environment variable is set to `false`.

tooling/cli/src/interface/rust.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ impl Interface for Rust {
155155
.features
156156
.get_or_insert(Vec::new())
157157
.push("custom-protocol".into());
158-
std::env::set_var("STATIC_VCRUNTIME", "true");
158+
159+
if !std::env::var("STATIC_VCRUNTIME").map_or(false, |v| v == "false") {
160+
std::env::set_var("STATIC_VCRUNTIME", "true");
161+
}
159162

160163
if options.target == Some("universal-apple-darwin".into()) {
161164
std::fs::create_dir_all(&out_dir)

0 commit comments

Comments
 (0)