mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-01-31 11:17:10 +08:00
Add support for aarch64 builds (#9).
This commit is contained in:
parent
a02f4df8f7
commit
b76e2627a2
38
dist/index.js
generated
vendored
38
dist/index.js
generated
vendored
@ -7,17 +7,31 @@ require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.MANDREL_NAMESPACE = exports.JDK_HOME_SUFFIX = exports.GRAALVM_PLATFORM = exports.GRAALVM_GH_USER = exports.GRAALVM_FILE_EXTENSION = exports.VERSION_LATEST = exports.VERSION_DEV = exports.IS_WINDOWS = exports.IS_MACOS = exports.IS_LINUX = void 0;
|
||||
exports.MANDREL_NAMESPACE = exports.JDK_HOME_SUFFIX = exports.GRAALVM_PLATFORM = exports.GRAALVM_GH_USER = exports.GRAALVM_FILE_EXTENSION = exports.GRAALVM_ARCH = exports.VERSION_LATEST = exports.VERSION_DEV = exports.IS_WINDOWS = exports.IS_MACOS = exports.IS_LINUX = void 0;
|
||||
exports.IS_LINUX = process.platform === 'linux';
|
||||
exports.IS_MACOS = process.platform === 'darwin';
|
||||
exports.IS_WINDOWS = process.platform === 'win32';
|
||||
exports.VERSION_DEV = 'dev';
|
||||
exports.VERSION_LATEST = 'latest';
|
||||
exports.GRAALVM_ARCH = determineGraalVMArchitecture();
|
||||
exports.GRAALVM_FILE_EXTENSION = exports.IS_WINDOWS ? '.zip' : '.tar.gz';
|
||||
exports.GRAALVM_GH_USER = 'graalvm';
|
||||
exports.GRAALVM_PLATFORM = exports.IS_WINDOWS ? 'windows' : process.platform;
|
||||
exports.JDK_HOME_SUFFIX = exports.IS_MACOS ? '/Contents/Home' : '';
|
||||
exports.MANDREL_NAMESPACE = 'mandrel-';
|
||||
function determineGraalVMArchitecture() {
|
||||
switch (process.arch) {
|
||||
case 'x64': {
|
||||
return 'amd64';
|
||||
}
|
||||
case 'arm64': {
|
||||
return 'aarch64';
|
||||
}
|
||||
default: {
|
||||
throw new Error(`Unsupported architecture: ${process.arch}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
@ -252,7 +266,7 @@ function setUpGraalVMRelease(version, javaVersion) {
|
||||
}
|
||||
exports.setUpGraalVMRelease = setUpGraalVMRelease;
|
||||
function determineGraalVMIdentifier(version, javaVersion) {
|
||||
return `graalvm-ce-java${javaVersion}-${c.GRAALVM_PLATFORM}-amd64-${version}`;
|
||||
return `graalvm-ce-java${javaVersion}-${c.GRAALVM_PLATFORM}-${c.GRAALVM_ARCH}-${version}`;
|
||||
}
|
||||
function determineToolName(javaVersion) {
|
||||
return `graalvm-ce-java${javaVersion}-${c.GRAALVM_PLATFORM}`;
|
||||
@ -497,7 +511,7 @@ function setUpMandrelRelease(version, javaVersion) {
|
||||
});
|
||||
}
|
||||
function determineMandrelIdentifier(version, javaVersion) {
|
||||
return `mandrel-java${javaVersion}-${c.GRAALVM_PLATFORM}-amd64-${version}`;
|
||||
return `mandrel-java${javaVersion}-${c.GRAALVM_PLATFORM}-${c.GRAALVM_ARCH}-${version}`;
|
||||
}
|
||||
function determineToolName(javaVersion) {
|
||||
return `mandrel-java${javaVersion}-${c.GRAALVM_PLATFORM}`;
|
||||
@ -11241,16 +11255,14 @@ function bytesToUuid(buf, offset) {
|
||||
var i = offset || 0;
|
||||
var bth = byteToHex;
|
||||
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
|
||||
return ([
|
||||
bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]]
|
||||
]).join('');
|
||||
return ([bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]], '-',
|
||||
bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]],
|
||||
bth[buf[i++]], bth[buf[i++]]]).join('');
|
||||
}
|
||||
|
||||
module.exports = bytesToUuid;
|
||||
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -7,6 +7,7 @@ export const IS_WINDOWS = process.platform === 'win32'
|
||||
export const VERSION_DEV = 'dev'
|
||||
export const VERSION_LATEST = 'latest'
|
||||
|
||||
export const GRAALVM_ARCH = determineGraalVMArchitecture()
|
||||
export const GRAALVM_FILE_EXTENSION = IS_WINDOWS ? '.zip' : '.tar.gz'
|
||||
export const GRAALVM_GH_USER = 'graalvm'
|
||||
export const GRAALVM_PLATFORM = IS_WINDOWS ? 'windows' : process.platform
|
||||
@ -16,3 +17,17 @@ export const MANDREL_NAMESPACE = 'mandrel-'
|
||||
|
||||
export type LatestReleaseResponse =
|
||||
otypes.Endpoints['GET /repos/{owner}/{repo}/releases/latest']['response']
|
||||
|
||||
function determineGraalVMArchitecture(): string {
|
||||
switch (process.arch) {
|
||||
case 'x64': {
|
||||
return 'amd64'
|
||||
}
|
||||
case 'arm64': {
|
||||
return 'aarch64'
|
||||
}
|
||||
default: {
|
||||
throw new Error(`Unsupported architecture: ${process.arch}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ function determineGraalVMIdentifier(
|
||||
version: string,
|
||||
javaVersion: string
|
||||
): string {
|
||||
return `graalvm-ce-java${javaVersion}-${c.GRAALVM_PLATFORM}-amd64-${version}`
|
||||
return `graalvm-ce-java${javaVersion}-${c.GRAALVM_PLATFORM}-${c.GRAALVM_ARCH}-${version}`
|
||||
}
|
||||
|
||||
function determineToolName(javaVersion: string): string {
|
||||
|
@ -54,7 +54,7 @@ function determineMandrelIdentifier(
|
||||
version: string,
|
||||
javaVersion: string
|
||||
): string {
|
||||
return `mandrel-java${javaVersion}-${c.GRAALVM_PLATFORM}-amd64-${version}`
|
||||
return `mandrel-java${javaVersion}-${c.GRAALVM_PLATFORM}-${c.GRAALVM_ARCH}-${version}`
|
||||
}
|
||||
|
||||
function determineToolName(javaVersion: string): string {
|
||||
|
Loading…
x
Reference in New Issue
Block a user