You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
api to get arm architecture of the binary as in the download page... #7803
I couldn't find any api to get the architecture of the binary itself,
process.arch just gives arm uname -a would give for the host.. not the binary node --v8-options gives target arm v7.. , and a lot of output..
I want it for the the binary as it is on the download page.. arm64armv6larmv7l
I dumped and greped the process object and found.. process.config.variables.arm_version among others...
Checking the api doc for process.config says it is not read-only and gives some warning about some packages changing it..
Could and api be added for this, or should we just parse this form process.config.variables.arm_* or --v8-options or any other suggestions..
I believe we do that to maximize compatibility with boards that are only nominally ARMv7-compatible, like the rpi1.
Code quality-wise it shouldn't matter too much because V8 detects the architecture at run-time. OpenSSL may be negatively affected but I'm not 100% sure about that, I think it does run-time feature detection as well.
This issue has been inactive for sufficiently long that it seems like perhaps it should be closed. Feel free to re-open (or leave a comment requesting that it be re-opened) if you disagree. I'm just tidying up and not acting on a super-strong opinion or anything like that.
I'm still interested on this feature. In fact, at prebuild/prebuild#174 we were discussing about using arm as an alias the same way x86 is an alias for i686, but we would need to know what aliased. Please reopen this for discussion.
Same question I just posted to #4531: Is anyone in a good position to move this issue forward? Or should we add a stalled and/or help wanted label? Or something else?
FYI the arm version should be fixed for Node 10+ since we're properly cross compiling with our own custom toolchain now and it's working really well. That's not the focus of this issue but it's relevant to some of the discussion.
I think I'd be OK with a process.arch_variant or something similar, that would be null on most platforms. I'm not sure an arm-specific property is a great idea. I still advise people to use process.config.variables.arm_version and don't really think there's a problem continuing to suggest that. 🤷♂️
@BridgeAR ... there are modules in the ecosystem that completely override the value of process.config under the assumption that it's world writable. Fun fun fun.
Do you know the reason they override process.config? We could allow extending process.config but disallow overriding it and prohibit changing existing properties.
Activity
mscdex commentedon Jul 20, 2016
If you don't mind using child processes, you could always use
fileorreadelf -h(if you know it's ELF) to get the same information.Fishrock123 commentedon Jul 20, 2016
process.config.variables.arm_versionis correct.Also, none of
processis read-only, so yeah.cswl commentedon Jul 20, 2016
test/common.jsseems to useprocess.config.variables.arm_versionnode/test/common.js
Lines 266 to 277 in 5aac4c4
But there is something strange, node.js
armv7lbinaries from https://nodejs.org/download gives6for theprocess.config.variables.arm_version.The output from
--v8-options | headare similar..But on distribution packaged one....
Fishrock123 commentedon Jul 20, 2016
cc @nodejs/build maybe?
bnoordhuis commentedon Jul 20, 2016
I believe we do that to maximize compatibility with boards that are only nominally ARMv7-compatible, like the rpi1.
Code quality-wise it shouldn't matter too much because V8 detects the architecture at run-time. OpenSSL may be negatively affected but I'm not 100% sure about that, I think it does run-time feature detection as well.
xbolshe commentedon Jul 27, 2016
FYI:
#4531 (comment)
PS: my compilation shows correct values:

Trott commentedon Jul 15, 2017
This issue has been inactive for sufficiently long that it seems like perhaps it should be closed. Feel free to re-open (or leave a comment requesting that it be re-opened) if you disagree. I'm just tidying up and not acting on a super-strong opinion or anything like that.
piranna commentedon Jul 15, 2017
I'm still interested on this feature. In fact, at prebuild/prebuild#174 we were discussing about using
armas an alias the same wayx86is an alias fori686, but we would need to know what aliased. Please reopen this for discussion.Trott commentedon Jul 15, 2017
Re-opened as requested.
piranna commentedon Jul 15, 2017
Thank you.
Trott commentedon Aug 10, 2017
Same question I just posted to #4531: Is anyone in a good position to move this issue forward? Or should we add a
stalledand/orhelp wantedlabel? Or something else?Trott commentedon Nov 8, 2018
I wonder if there would be resistance to adding more stuff to
processin general? (I assume that's where this requested property would live.)rvagg commentedon Nov 9, 2018
FYI the arm version should be fixed for Node 10+ since we're properly cross compiling with our own custom toolchain now and it's working really well. That's not the focus of this issue but it's relevant to some of the discussion.
I think I'd be OK with a
process.arch_variantor something similar, that would benullon most platforms. I'm not sure an arm-specific property is a great idea. I still advise people to useprocess.config.variables.arm_versionand don't really think there's a problem continuing to suggest that. 🤷♂️BridgeAR commentedon Jan 2, 2020
Wouldn't an easy solution be to make
process.config.variables.arm_versionread only?jasnell commentedon Jan 2, 2020
@BridgeAR ... there are modules in the ecosystem that completely override the value of
process.configunder the assumption that it's world writable. Fun fun fun.BridgeAR commentedon Jan 2, 2020
Do you know the reason they override
process.config? We could allow extendingprocess.configbut disallow overriding it and prohibit changing existing properties.process: runtime deprecate changing process.config
process: runtime deprecate changing process.config