feat: Support Linux ARM64 GNU
This commit is contained in:
@@ -166,6 +166,9 @@ jobs:
|
|||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
use-cross: true
|
use-cross: true
|
||||||
cargo-flags: ''
|
cargo-flags: ''
|
||||||
|
- target: aarch64-unknown-linux-gnu
|
||||||
|
os: ubuntu-24.04-arm
|
||||||
|
cargo-flags: ''
|
||||||
- target: aarch64-apple-darwin
|
- target: aarch64-apple-darwin
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
use-cross: true
|
use-cross: true
|
||||||
@@ -253,7 +256,7 @@ jobs:
|
|||||||
run: echo "BUILD_CMD=cross" >> $GITHUB_ENV
|
run: echo "BUILD_CMD=cross" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Install latest LLVM/Clang
|
- name: Install latest LLVM/Clang
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
run: |
|
run: |
|
||||||
wget https://apt.llvm.org/llvm.sh
|
wget https://apt.llvm.org/llvm.sh
|
||||||
chmod +x llvm.sh
|
chmod +x llvm.sh
|
||||||
|
|||||||
@@ -61,8 +61,6 @@ if ($os -eq 'windows') {
|
|||||||
if ($arch -eq 'x86_64') { $candidates += 'coyote-x86_64-apple-darwin.tar.gz' }
|
if ($arch -eq 'x86_64') { $candidates += 'coyote-x86_64-apple-darwin.tar.gz' }
|
||||||
else { $candidates += 'coyote-aarch64-apple-darwin.tar.gz' }
|
else { $candidates += 'coyote-aarch64-apple-darwin.tar.gz' }
|
||||||
} elseif ($os -eq 'linux') {
|
} elseif ($os -eq 'linux') {
|
||||||
if ($arch -eq 'x86_64') {
|
|
||||||
# Mirror install_coyote.sh: only offer the gnu build when glibc is detected.
|
|
||||||
$libc = 'musl'
|
$libc = 'musl'
|
||||||
try { getconf GNU_LIBC_VERSION *> $null; if ($LASTEXITCODE -eq 0) { $libc = 'gnu' } } catch { }
|
try { getconf GNU_LIBC_VERSION *> $null; if ($LASTEXITCODE -eq 0) { $libc = 'gnu' } } catch { }
|
||||||
try { if ((ldd --version 2>&1 | Out-String) -imatch 'glibc') { $libc = 'gnu' } } catch { }
|
try { if ((ldd --version 2>&1 | Out-String) -imatch 'glibc') { $libc = 'gnu' } } catch { }
|
||||||
@@ -70,15 +68,12 @@ if ($os -eq 'windows') {
|
|||||||
$libssl3 = $false
|
$libssl3 = $false
|
||||||
try { if ((ldconfig -p 2>&1 | Out-String) -match 'libssl\.so\.3') { $libssl3 = $true } } catch { }
|
try { if ((ldconfig -p 2>&1 | Out-String) -match 'libssl\.so\.3') { $libssl3 = $true } } catch { }
|
||||||
if ($libssl3) {
|
if ($libssl3) {
|
||||||
$candidates += 'coyote-x86_64-unknown-linux-gnu.tar.gz'
|
$candidates += "coyote-$arch-unknown-linux-gnu.tar.gz"
|
||||||
} else {
|
} else {
|
||||||
Write-Info "glibc detected but OpenSSL 3 (libssl.so.3) not found; using musl build"
|
Write-Info "glibc detected but OpenSSL 3 (libssl.so.3) not found; using musl build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$candidates += 'coyote-x86_64-unknown-linux-musl.tar.gz'
|
$candidates += "coyote-$arch-unknown-linux-musl.tar.gz"
|
||||||
} else {
|
|
||||||
$candidates += 'coyote-aarch64-unknown-linux-musl.tar.gz'
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Fail "Unsupported OS for this installer: $os"
|
Fail "Unsupported OS for this installer: $os"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,23 +116,19 @@ if [[ "$OS" == "darwin" ]]; then
|
|||||||
ASSET_CANDIDATES+=("coyote-aarch64-apple-darwin.tar.gz")
|
ASSET_CANDIDATES+=("coyote-aarch64-apple-darwin.tar.gz")
|
||||||
fi
|
fi
|
||||||
elif [[ "$OS" == "linux" ]]; then
|
elif [[ "$OS" == "linux" ]]; then
|
||||||
if [[ "$ARCH" == "x86_64" ]]; then
|
|
||||||
LIBC="musl"
|
LIBC="musl"
|
||||||
if command -v getconf >/dev/null 2>&1 && getconf GNU_LIBC_VERSION >/dev/null 2>&1; then LIBC="gnu"; fi
|
if command -v getconf >/dev/null 2>&1 && getconf GNU_LIBC_VERSION >/dev/null 2>&1; then LIBC="gnu"; fi
|
||||||
if ldd --version 2>&1 | grep -qi glibc; then LIBC="gnu"; fi
|
if ldd --version 2>&1 | grep -qi glibc; then LIBC="gnu"; fi
|
||||||
|
|
||||||
if [[ "$LIBC" == "gnu" ]]; then
|
if [[ "$LIBC" == "gnu" ]]; then
|
||||||
if ldconfig -p 2>/dev/null | grep -q 'libssl\.so\.3'; then
|
if ldconfig -p 2>/dev/null | grep -q 'libssl\.so\.3'; then
|
||||||
ASSET_CANDIDATES+=("coyote-x86_64-unknown-linux-gnu.tar.gz")
|
ASSET_CANDIDATES+=("coyote-${ARCH}-unknown-linux-gnu.tar.gz")
|
||||||
else
|
else
|
||||||
log "glibc detected but OpenSSL 3 (libssl.so.3) not found; using musl build"
|
log "glibc detected but OpenSSL 3 (libssl.so.3) not found; using musl build"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ASSET_CANDIDATES+=("coyote-x86_64-unknown-linux-musl.tar.gz")
|
ASSET_CANDIDATES+=("coyote-${ARCH}-unknown-linux-musl.tar.gz")
|
||||||
else
|
|
||||||
ASSET_CANDIDATES+=("coyote-aarch64-unknown-linux-musl.tar.gz")
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "Error: unsupported OS for this installer: $OS" >&2; exit 1
|
echo "Error: unsupported OS for this installer: $OS" >&2; exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ fn preferred_update_target() -> Option<&'static str> {
|
|||||||
match (env::consts::OS, env::consts::ARCH) {
|
match (env::consts::OS, env::consts::ARCH) {
|
||||||
("linux", "x86_64") if cfg!(target_env = "gnu") => Some("x86_64-unknown-linux-gnu"),
|
("linux", "x86_64") if cfg!(target_env = "gnu") => Some("x86_64-unknown-linux-gnu"),
|
||||||
("linux", "x86_64") => Some("x86_64-unknown-linux-musl"),
|
("linux", "x86_64") => Some("x86_64-unknown-linux-musl"),
|
||||||
// No aarch64 gnu asset is published; musl is the only option.
|
("linux", "aarch64") if cfg!(target_env = "gnu") => Some("aarch64-unknown-linux-gnu"),
|
||||||
("linux", "aarch64") => Some("aarch64-unknown-linux-musl"),
|
("linux", "aarch64") => Some("aarch64-unknown-linux-musl"),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user