Update the list of architectures and operating systems for tarball names.
This commit is contained in:
committed by
Matthew Lugg
parent
6c200f69e9
commit
82c18a2c73
@@ -67,19 +67,40 @@ async function getVersion() {
|
|||||||
async function getTarballName() {
|
async function getTarballName() {
|
||||||
const version = await getVersion();
|
const version = await getVersion();
|
||||||
|
|
||||||
const arch = {
|
let arch = {
|
||||||
arm: 'armv7a',
|
arm: 'armv7a',
|
||||||
arm64: 'aarch64',
|
arm64: 'aarch64',
|
||||||
ppc64: 'powerpc64',
|
loong64: 'loongarch64',
|
||||||
riscv64: 'riscv64',
|
mips: 'mips',
|
||||||
x64: 'x86_64',
|
mipsel: 'mipsel',
|
||||||
|
mips64: 'mips64',
|
||||||
|
mips64el: 'mips64el',
|
||||||
|
ppc64: 'powerpc64',
|
||||||
|
riscv64: 'riscv64',
|
||||||
|
s390x: 's390x',
|
||||||
|
ia32: 'x86',
|
||||||
|
x64: 'x86_64',
|
||||||
}[os.arch()];
|
}[os.arch()];
|
||||||
|
|
||||||
return {
|
// For some incomprehensible reason, Node.js's brain-damaged build system explicitly throws away
|
||||||
linux: `zig-linux-${arch}-${version}`,
|
// the knowledge that it is building for ppc64le, so os.arch() will identify it as ppc64 even on
|
||||||
darwin: `zig-macos-${arch}-${version}`,
|
// little endian.
|
||||||
win32: `zig-windows-${arch}-${version}`,
|
if (arch === 'powerpc64' && os.endianness() === 'LE') {
|
||||||
|
arch = 'powerpc64le';
|
||||||
|
}
|
||||||
|
|
||||||
|
const platform = {
|
||||||
|
aix: 'aix',
|
||||||
|
android: 'android',
|
||||||
|
freebsd: 'freebsd',
|
||||||
|
linux: 'linux',
|
||||||
|
darwin: 'macos',
|
||||||
|
openbsd: 'openbsd',
|
||||||
|
sunos: 'solaris',
|
||||||
|
win32: 'windows',
|
||||||
}[os.platform()];
|
}[os.platform()];
|
||||||
|
|
||||||
|
return `zig-${platform}-${arch}-${version}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getTarballExt() {
|
async function getTarballExt() {
|
||||||
|
|||||||
Reference in New Issue
Block a user