This commit is contained in:
SteVen Batten 2024-06-14 10:05:09 -07:00
Родитель a838c362c5
Коммит c15f95290d
Не найден ключ, соответствующий данной подписи
2 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -30,6 +30,10 @@ steps:
additionalTargets: ${{ parameters.target }}
displayName: Install Rust toolchain
- task: CargoAuthenticate@0
inputs:
configFile: '.cargo/config.toml'
# - powershell: |
# echo $env:reason
# echo $BUILD_SOURCEVERSION
@ -47,6 +51,7 @@ steps:
# displayName: msrustup
- powershell: |
$env:CFLAGS="/guard:cf /Qspectre"
cargo build --release --target $env:TARGET --features pcre2
cargo test --target "$TARGET" --release --verbose --all --features 'pcre2'

Просмотреть файл

@ -2,7 +2,7 @@ diff --git a/.cargo/config.toml b/.cargo/config.toml
index 7db936b..17a3deb 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -1,8 +1,11 @@
@@ -1,8 +1,17 @@
-# On Windows MSVC, statically link the C runtime so that the resulting EXE does
-# not depend on the vcruntime DLL.
-#
@ -11,6 +11,12 @@ index 7db936b..17a3deb 100644
-rustflags = ["-C", "target-feature=+crt-static"]
-[target.i686-pc-windows-msvc]
-rustflags = ["-C", "target-feature=+crt-static"]
+[source.crates-io]
+replace-with = 'ms-crates-io'
+
+[registries.ms-crates-io]
+index = "sparse+https://pkgs.dev.azure.com/vscode/_packaging/crates/Cargo/index/"
+
+# -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")']