Skip to content

Commit a7903f2

Browse files
authored
Ensure crt-static is applied to all platforms (#123)
1 parent 78c9431 commit a7903f2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.cargo/config.toml.disabled

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
# [registries.ms-crates-io]
55
# index = "sparse+https://pkgs.dev.azure.com/vscode/_packaging/crates/Cargo/index/"
66

7+
# Windows: -Ctarget-feature=+crt-static: Statically link the CRT (required to link the spectre-mitigated CRT).
8+
# Other: -Ctarget-feature=+crt-static: Statically link the CRT
9+
[build]
10+
rustflags = ["-Ctarget-feature=+crt-static"]
11+
712
# -Cehcont_guard: Enable EH Continuation Metadata (https://learn.microsoft.com/en-us/cpp/build/reference/guard-enable-eh-continuation-metadata).
813
# -Ccontrol-flow-guard: Enable Control Flow Guard, needed for OneBranch's post-build analysis (https://learn.microsoft.com/en-us/cpp/build/reference/guard-enable-control-flow-guard).
914
# -Ctarget-feature=+crt-static: Statically link the CRT (required to link the spectre-mitigated CRT).
1015
[target.'cfg(target_os = "windows")']
11-
rustflags = ["-Cehcont_guard", "-Ccontrol-flow-guard", "-Ctarget-feature=+crt-static"]
16+
rustflags = ["-Cehcont_guard", "-Ccontrol-flow-guard"]
1217

1318
# -Clink-args=/DYNAMICBASE /CETCOMPAT: Enable "shadow stack" (https://learn.microsoft.com/en-us/cpp/build/reference/cetcompat)
1419
[target.'cfg(all(target_os = "windows", any(target_arch = "i686", target_arch = "x86_64")))']

0 commit comments

Comments
 (0)