Skip to content

Commit 27d297c

Browse files
committed
feat(x86_64): add v4 and ROCm
1 parent 28536b0 commit 27d297c

File tree

4 files changed

+32
-18
lines changed

4 files changed

+32
-18
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ Also compares versions lexicographically.
5454
"x86",
5555
"x86_64",
5656
"x86_64_v2",
57-
"x86_64_v3"
57+
"x86_64_v3",
58+
"x86_64_v4",
59+
"x86_64_rocm"
5860
],
5961
"oses": [
6062
"",

host-targets.js

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,31 @@ let reLeadingVer = /^\d([\d\.\-\+_])+/;
1313
// gki = Generic Kernel Image
1414
// qgki = Qualcomm Generic Kernel Image
1515

16+
let X86_64 = {
17+
x86_64_rocm: ['x86_64_rocm', 'x86_64_v4', 'x86_64_v3', 'x86_64_v2', 'x86_64'],
18+
x86_64_v4: ['x86_64_v4', 'x86_64_v3', 'x86_64_v2', 'x86_64'],
19+
x86_64_v3: ['x86_64_v3', 'x86_64_v2', 'x86_64', 'x86'],
20+
x86_64_v2: ['x86_64_v2', 'x86_64', 'x86'],
21+
x86_64: ['x86_64', 'x86'],
22+
};
23+
1624
HostTargets.WATERFALL = {
1725
darwin: { aarch64: ['aarch64', 'x86_64'] },
18-
windows: {
19-
aarch64: ['aarch64', 'x86_64'],
20-
x86_64_v3: ['x86_64_v3', 'x86_64_v2', 'x86_64', 'x86'],
21-
x86_64_v2: ['x86_64_v2', 'x86_64', 'x86'],
22-
},
23-
linux: {
24-
// NOTE: the libc:armhf will need to be installed
25-
aarch64: ['aarch64', 'armv7a', 'armv7', 'armhf'],
26-
x86_64_v3: ['x86_64_v3', 'x86_64_v2', 'x86_64', 'x86'],
27-
x86_64_v2: ['x86_64_v2', 'x86_64', 'x86'],
28-
},
29-
ANYOS: {
26+
windows: Object.assign(
27+
{
28+
aarch64: ['aarch64', 'x86_64'],
29+
},
30+
X86_64,
31+
),
32+
linux: Object.assign(
33+
{
34+
// NOTE: the libc:armhf will need to be installed
35+
aarch64: ['aarch64', 'armv7a', 'armv7', 'armhf'],
36+
},
37+
X86_64,
38+
),
39+
ANYOS: Object.assign({}, X86_64, {
3040
// arches
31-
x86_64_v3: ['x86_64_v3', 'x86_64_v2', 'x86_64'],
32-
x86_64_v2: ['x86_64_v2', 'x86_64'],
33-
x86_64: ['x86_64', 'x86'],
3441
armv7: ['armv7a', 'armv7', 'armhf', 'armv6', 'armel', 'armv5'],
3542
armv6: ['armv6', 'armel', 'armv5'],
3643
armv5: ['armv5', 'armel'],
@@ -45,7 +52,7 @@ HostTargets.WATERFALL = {
4552
// prefer 'bionic' because it's built-in
4653
// (TODO test to see if statically-compiled linux bins work)
4754
bionic: ['bionic', 'none'],
48-
},
55+
}),
4956
};
5057

5158
// The Terms

triplet.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ var Triplet = ('object' === typeof module && exports) || {};
203203
X86_64: { arch: 'x86_64' },
204204
X86_64_V2: { arch: 'x86_64_v2' },
205205
X86_64_V3: { arch: 'x86_64_v3' },
206+
X86_64_V4: { arch: 'x86_64_v4' },
207+
AMD64_ROCM: { arch: 'x86_64_rocm' },
206208
AARCH64: { arch: 'aarch64' },
207209
X86: { arch: 'x86' },
208210
ARMV7A: { arch: 'armv7a' },
@@ -293,10 +295,13 @@ var Triplet = ('object' === typeof module && exports) || {};
293295
tpm['x86_64_v1'] = T.X86_64;
294296
tpm['x86_64_v2'] = T.X86_64_V2;
295297
tpm['x86_64_v3'] = T.X86_64_V3;
298+
tpm['x86_64_v4'] = T.X86_64_V4;
296299
tpm['amd64'] = T.X86_64;
297300
tpm['amd64_v1'] = T.X86_64;
298301
tpm['amd64_v2'] = T.X86_64_V2;
299302
tpm['amd64_v3'] = T.X86_64_V3;
303+
tpm['amd64_v4'] = T.X86_64_V4;
304+
tpm['amd64_rocm'] = T.AMD64_ROCM;
300305
tpm['x64'] = T.X86_64;
301306
tpm['aarch64'] = T.AARCH64;
302307
tpm['arm64'] = T.AARCH64;

types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports._types = true;
1111
*/
1212

1313
/**
14-
* @typedef {""|"ANYARCH"|"POSIX"|"aarch64"|"armel"|"armhf"|"armv6"|"armv7"|"armv7a"|"loong64"|"mips"|"mips64"|"mips64el"|"mips64r6"|"mips64r6el"|"mipsel"|"mipsr6"|"mipsr6el"|"ppc"|"ppc64"|"ppc64le"|"riscv64"|"s390x"|"wasm32"|"x86"|"x86_64"|"x86_64_v2"|"x86_64_v3"} ArchString
14+
* @typedef {""|"ANYARCH"|"POSIX"|"aarch64"|"armel"|"armhf"|"armv6"|"armv7"|"armv7a"|"loong64"|"mips"|"mips64"|"mips64el"|"mips64r6"|"mips64r6el"|"mipsel"|"mipsr6"|"mipsr6el"|"ppc"|"ppc64"|"ppc64le"|"riscv64"|"s390x"|"wasm32"|"x86"|"x86_64"|"x86_64_v2"|"x86_64_v3"|"x86_64_v4"|"x86_64_rocm"} ArchString
1515
*/
1616

1717
/**

0 commit comments

Comments
 (0)