Skip to content

Commit ebe1bb9

Browse files
committed
specify architecture
1 parent eb0beda commit ebe1bb9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

build.ps1

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,18 @@ if ($null -ne $packageType) {
236236
& $rustup default stable
237237
}
238238

239-
if ($Clippy -and $null -eq (Get-Command cargo-clippy -ErrorAction Ignore)) {
240-
Write-Verbose -Verbose "clippy not found, installing..."
239+
if ($Clippy) {
240+
Write-Verbose -Verbose "Installing clippy..."
241241
if ($UseCFS) {
242242
cargo install clippy --config .cargo/config.toml
243243
} else {
244-
cargo install clippy
244+
if ($architecture -ne 'current') {
245+
write-verbose -verbose "Installing clippy for $architecture"
246+
& $rustup component add clippy --target $architecture
247+
} else {
248+
write-verbose -verbose "Installing clippy for current architecture"
249+
& $rustup component add clippy
250+
}
245251
}
246252
if ($LASTEXITCODE -ne 0) {
247253
throw "Failed to install clippy"

0 commit comments

Comments
 (0)