This commit is contained in:
SteVen Batten 2024-06-13 17:20:25 -07:00
Родитель c4fac96cbe
Коммит c218aaa843
Не найден ключ, соответствующий данной подписи
3 изменённых файлов: 57 добавлений и 2 удалений

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

@ -14,6 +14,15 @@ steps:
git checkout $TREEISH
displayName: Clone ripgrep
- powershell: |
$patches = node -p "require('../config.json').patches.join(' ')"
foreach ($patch in $patches) {
git apply --ignore-whitespace --ignore-space-change ../patches/$patch
}
workingDirectory: ripgrep
displayName: Apply patches
condition: succeeded()
- powershell: |
echo $env:reason
echo $BUILD_SOURCEVERSION
@ -51,7 +60,10 @@ steps:
workingDirectory: ripgrep
env:
TARGET: ${{ parameters.target }}
RUSTFLAGS: -Ctarget-feature=+crt-static -Ccontrol-flow-guard -Clink-arg=/CETCOMPAT -Clink-arg=/DYNAMICBASE -Clink-arg=/sdl"
${{ if eq(parameters.target, 'aarch64-pc-windows-msvc') }}:
RUSTFLAGS: -Ctarget-feature=+crt-static -Ccontrol-flow-guard -Clink-arg=/DYNAMICBASE
${{ else }}:
RUSTFLAGS: -Ctarget-feature=+crt-static -Ccontrol-flow-guard -Clink-arg=/CETCOMPAT -Clink-arg=/DYNAMICBASE -Clink-arg=/sdl"
condition: succeeded()
- powershell: mkdir $(Build.ArtifactStagingDirectory)/_manifest

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

@ -2,6 +2,7 @@
"ripgrepRepo": "BurntSushi/ripgrep",
"ripgrepTag": "13.0.0",
"patches": [
"0001-feat-pass-env-for-aarch64-unknown-linux-musl-via-cross.patch"
"0001-feat-pass-env-for-aarch64-unknown-linux-musl-via-cross.patch",
"0002-msvc-spectre-libs.patch"
]
}

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

@ -0,0 +1,42 @@
diff --git a/Cargo.lock b/Cargo.lock
index 76cd146..5e8233b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -347,6 +347,15 @@ dependencies = [
"libc",
]
+[[package]]
+name = "msvc_spectre_libs"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6431d928428b689805ff8b2a0687760c3d1aa9845d165535a619e1c028bfbbb1"
+dependencies = [
+ "cc",
+]
+
[[package]]
name = "num_cpus"
version = "1.13.0"
@@ -454,6 +463,7 @@ dependencies = [
"jemallocator",
"lazy_static",
"log",
+ "msvc_spectre_libs",
"num_cpus",
"regex",
"serde",
diff --git a/Cargo.toml b/Cargo.toml
index fb78fcb..2a29c40 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -51,6 +51,9 @@ regex = "1.3.5"
serde_json = "1.0.23"
termcolor = "1.1.0"
+[target.'cfg(target_os = "windows")'.dependencies]
+msvc_spectre_libs = { version = "0.1.1", features = ["error"] }
+
[dependencies.clap]
version = "2.33.0"
default-features = false