Description
While attempting to track down the possible values for target_arch
/process.arch
I noticed that there is some strange stuff going on with regard to node's CPU architecture references at build time. Specifically:
-
tools/v8_gypfiles/v8.gyp references
"mips64"
for(v8_)target_arch
, which is not a value permitted/used by configure.py anywhere. -
tools/v8_gypfiles/v8.gyp appears to be missing support for
"x32"
(although tools/v8_gypfiles/toolchain.gypi seems to check for it), which is allowed by configure.py. At the very least the sources for the relevant builtins-*.cc file are missing for this platform. -
tools/v8_gypfiles/v8.gyp does the same check twice in the same conditional. Not sure if the second check should be removed or if one of the values was supposed to be something like
"riscv32"
.- If it's supposed to be
"riscv32"
, then we should probably add this to configure.py and elsewhere.
- If it's supposed to be
-
configure.py can return
"riscv32"
fromhost_arch_cc()
(whose return value gets set totarget_arch
when not cross compiling). This arch is not listed as a valid arch in configure.py (and further leads me to believe that one of the checks in the previous point should've been"riscv32"
). -
host_arch_cc()
in configure.py also seems to return'ppc64'
when checking for the__PPC__
define, which AFAICT is 32-bit and thus should be'ppc'
instead. -
host_arch_cc()
is missing support for checking for x32 ABI, which AFAICT should be doable by checking both__ILP32__
and__x86_64__
. -
process.arch docs seem to be outdated. Depending on if/how any of the above issues get resolved, at least the following values appear to be missing:
'mips64'
'mips64el'
'riscv64'
Also the following
process.arch
values should be removed from the documented list because they don't show up anywhere in the build system(?):'s390'