Skip to content

Commit

Permalink
Fix prebuild#76, ARMv7 detection
Browse files Browse the repository at this point in the history
Signed-off-by: paulober <[email protected]>
  • Loading branch information
paulober committed Sep 11, 2024
1 parent c764234 commit 734165f
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions node-gyp-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,22 @@ var runtime = isElectron() ? 'electron' : (isNwjs() ? 'node-webkit' : 'node')
var arch = process.env.npm_config_arch || os.arch()
var platform = process.env.npm_config_platform || os.platform()
var libc = process.env.LIBC || (isAlpine(platform) ? 'musl' : 'glibc')
// ARMv7 detection patched to avoid arm_version === "default" on other arm systems than arm64 ones
var armv = process.env.ARM_VERSION || (arch === 'arm64' ? '8' : (arch === 'arm' ? (vars.arm_version === 'default' ? '7' : vars.arm_version) : '')) || ''
let armv = process.env.ARM_VERSION;
if (!armv) {
if (arch === 'arm64') {
armv = '8';
} else if (arch === 'arm') {
// ARMv7 detection patched to avoid arm_version === "default"
// on other arm systems than arm64 ones
if (vars.arm_version === 'default') {
armv = '7';
} else {
armv = vars.arm_version;
}
} else {
armv = '';
}
}
var uv = (process.versions.uv || '').split('.')[0]

module.exports = load
Expand Down

0 comments on commit 734165f

Please sign in to comment.