0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00

build: add riscv into host_arch_cc

PR-URL: https://github.com/nodejs/node/pull/39004
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
Lu Yahan 2021-06-11 16:09:30 +08:00 committed by Michaël Zasso
parent 60646cade7
commit 1d638976d5
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600

View File

@ -1066,6 +1066,7 @@ def host_arch_cc():
'__PPC__' : 'ppc64',
'__x86_64__' : 'x64',
'__s390x__' : 's390x',
'__riscv' : 'riscv',
}
rtn = 'ia32' # default
@ -1078,6 +1079,12 @@ def host_arch_cc():
if rtn == 'mipsel' and '_LP64' in k:
rtn = 'mips64el'
if rtn == 'riscv':
if k['__riscv_xlen'] == '64':
rtn = 'riscv64'
else:
rtn = 'riscv32'
return rtn