diff --git a/.cargo/config.toml.disabled b/.cargo/config.toml.disabled index 49519f16..478c4b99 100644 --- a/.cargo/config.toml.disabled +++ b/.cargo/config.toml.disabled @@ -4,17 +4,16 @@ # [registries.ms-crates-io] # index = "sparse+https://pkgs.dev.azure.com/vscode/_packaging/crates/Cargo/index/" -# Windows: -Ctarget-feature=+crt-static: Statically link the CRT (required to link the spectre-mitigated CRT). -# Other: -Ctarget-feature=+crt-static: Statically link the CRT -[build] +# Linux: -Ctarget-feature=+crt-static: Statically link the CRT. +[target.'cfg(target_os = "linux")'] rustflags = ["-Ctarget-feature=+crt-static"] # -Cehcont_guard: Enable EH Continuation Metadata (https://learn.microsoft.com/en-us/cpp/build/reference/guard-enable-eh-continuation-metadata). # -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). # -Ctarget-feature=+crt-static: Statically link the CRT (required to link the spectre-mitigated CRT). [target.'cfg(target_os = "windows")'] -rustflags = ["-Cehcont_guard", "-Ccontrol-flow-guard"] +rustflags = ["-Ctarget-feature=+crt-static", "-Cehcont_guard", "-Ccontrol-flow-guard"] # -Clink-args=/DYNAMICBASE /CETCOMPAT: Enable "shadow stack" (https://learn.microsoft.com/en-us/cpp/build/reference/cetcompat) [target.'cfg(all(target_os = "windows", any(target_arch = "i686", target_arch = "x86_64")))'] -rustflags = ["-Clink-args=/DYNAMICBASE /CETCOMPAT"] \ No newline at end of file +rustflags = ["-Ctarget-feature=+crt-static", "-Clink-args=/DYNAMICBASE /CETCOMPAT"] \ No newline at end of file