Skip to content

Commit 74ddb0b

Browse files
committed
Fix #76, ARMv7 detection
Signed-off-by: paulober <[email protected]>
1 parent 7a458c7 commit 74ddb0b

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

node-gyp-build.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,22 @@ var runtime = isElectron() ? 'electron' : (isNwjs() ? 'node-webkit' : 'node')
1313
var arch = process.env.npm_config_arch || os.arch()
1414
var platform = process.env.npm_config_platform || os.platform()
1515
var libc = process.env.LIBC || (isAlpine(platform) ? 'musl' : 'glibc')
16-
var armv = process.env.ARM_VERSION || (arch === 'arm64' ? '8' : vars.arm_version) || ''
16+
let armv = process.env.ARM_VERSION;
17+
if (!armv) {
18+
if (arch === 'arm64') {
19+
armv = '8';
20+
} else if (arch === 'arm') {
21+
// ARMv7 detection patched to avoid arm_version === "default"
22+
// on other arm systems than arm64 ones
23+
if (vars.arm_version === 'default') {
24+
armv = '7';
25+
} else {
26+
armv = vars.arm_version;
27+
}
28+
} else {
29+
armv = '';
30+
}
31+
}
1732
var uv = (process.versions.uv || '').split('.')[0]
1833

1934
module.exports = load

0 commit comments

Comments
 (0)