Skip to content

Commit 68d98bb

Browse files
feat: add loong64 support
1 parent c4c9356 commit 68d98bb

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

setup.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ node_version_centos7="v16.20.2"
3131
# Node download base URL - primary
3232
node_download_url_base="https://nodejs.org/dist/"
3333

34+
# Unoffical build of Node.js, for more ISA support
35+
node_unoffical_build_url="https://unofficial-builds.nodejs.org/download/release/"
36+
3437
# Node download URL - fallback.
3538
# This is the URL points directly to the file, not the base. This can also be a local absolute path.
3639
# Only supports https:// or http:// for web locations.
@@ -668,6 +671,11 @@ resolve_node_arch() {
668671
armv7l)
669672
node_arch="armv7l"
670673
;;
674+
loongarch64)
675+
node_arch="loong64"
676+
# Use unoffical build
677+
node_download_url_base=$node_unoffical_build_url
678+
;;
671679
*)
672680
cprint red bold "Unsupported architecture for Node.js: $arch"
673681
return 1

setup_cn.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ node_version_centos7="v16.20.2"
3131
# Node download base URL - primary
3232
node_download_url_base="https://nodejs.org/dist/"
3333

34+
# Unoffical build of Node.js, for more ISA support
35+
node_unoffical_build_url="https://unofficial-builds.nodejs.org/download/release/"
36+
3437
# Node download URL - fallback.
3538
# This is the URL points directly to the file, not the base. This can also be a local absolute path.
3639
# Only supports https:// or http:// for web locations.
@@ -665,6 +668,11 @@ resolve_node_arch() {
665668
armv7l)
666669
node_arch="armv7l"
667670
;;
671+
loongarch64)
672+
node_arch="loong64"
673+
# Use unoffical build
674+
node_download_url_base=$node_unoffical_build_url
675+
;;
668676
*)
669677
cprint red bold "Node.js不支持的架构: $arch"
670678
return 1

setup_cn_test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ node_version="v20.12.2"
3030
# Node download base URL - primary
3131
node_download_url_base="https://nodejs.org/dist/"
3232

33+
# Unoffical build of Node.js, for more ISA support
34+
node_unoffical_build_url="https://unofficial-builds.nodejs.org/download/release/"
35+
3336
# Node download URL - fallback.
3437
# This is the URL points directly to the file, not the base. This can also be a local absolute path.
3538
# Only supports https:// or http:// for web locations.
@@ -654,6 +657,11 @@ resolve_node_arch() {
654657
armv7l)
655658
node_arch="armv7l"
656659
;;
660+
loongarch64)
661+
node_arch="loong64"
662+
# Use unoffical build
663+
node_download_url_base=$node_unoffical_build_url
664+
;;
657665
*)
658666
cprint red bold "Node.js不支持的架构: $arch"
659667
return 1

0 commit comments

Comments
 (0)