Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,3 @@ rustflags = ["-Ccontrol-flow-guard", "-Ctarget-feature=+crt-static", "-Clink-arg
[source.crates-io]
replace-with = "POWERSHELL"

#[target.aarch64-unknown-linux-gnu]
#linker = "aarch64-linux-gnu-gcc"

#[target.aarch64-unknown-linux-musl]
#linker = "aarch64-linux-musl-gcc"
20 changes: 15 additions & 5 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ if ($null -ne (Get-Command msrustup -CommandType Application -ErrorAction Ignore
}
} elseif ($null -ne (Get-Command rustup -CommandType Application -ErrorAction Ignore)) {
$rustup = 'rustup'
} else {
$rustup = 'echo'
}

if ($null -ne $packageType) {
Expand Down Expand Up @@ -229,7 +227,11 @@ if ($null -ne $packageType) {
## Test if tree-sitter is installed
if ($null -eq (Get-Command tree-sitter -ErrorAction Ignore)) {
Write-Verbose -Verbose "tree-sitter not found, installing..."
cargo install tree-sitter-cli --config .cargo/config.toml
if ($UseCratesIO) {
cargo install tree-sitter-cli
} else {
cargo install tree-sitter-cli --config .cargo/config.toml
}
if ($LASTEXITCODE -ne 0) {
throw "Failed to install tree-sitter-cli"
}
Expand Down Expand Up @@ -380,7 +382,11 @@ if (!$SkipBuild) {
else {
if ($Audit) {
if ($null -eq (Get-Command cargo-audit -ErrorAction Ignore)) {
cargo install cargo-audit --features=fix --config .cargo/config.toml
if ($UseCratesIO) {
cargo install cargo-audit --features=fix
} else {
cargo install cargo-audit --features=fix --config .cargo/config.toml
}
}

cargo audit fix
Expand Down Expand Up @@ -413,7 +419,11 @@ if (!$SkipBuild) {
else {
if ($Audit) {
if ($null -eq (Get-Command cargo-audit -ErrorAction Ignore)) {
cargo install cargo-audit --features=fix --config .cargo/config.toml
if ($UseCratesIO) {
cargo install cargo-audit --features=fix
} else {
cargo install cargo-audit --features=fix --config .cargo/config.toml
}
}

cargo audit fix
Expand Down
Loading