diff --git a/lib/system.js b/lib/system.js index c0db90e..8edd3db 100644 --- a/lib/system.js +++ b/lib/system.js @@ -4,7 +4,7 @@ function getAbi () { return 'm' + process.versions.modules; } -function getArmArch () { +function getArmHost () { var cpu = fs.readFileSync('/proc/cpuinfo', 'utf8'); if (cpu.indexOf('vfpv3') >= 0) return 'armv7'; var name = cpu.split('model name')[1]; @@ -14,20 +14,20 @@ function getArmArch () { return 'armv6'; } -function getArch () { - var arch = process.arch; - if (arch === 'ia32') return 'x86'; - if (arch === 'arm') return getArmArch(); - return arch; +function getHost () { + var host = process.arch; + if (host === 'ia32') return 'x86'; + if (host === 'arm') return getArmHost(); + return host; } function getTargets () { - const a = getArch(); - if (a === 'x64') return [ 'x64', 'x86' ]; + const host = getHost(); + if (host === 'x64') return [ 'x64', 'x86' ]; // TODO find a way to crosscompile for armv6 on armv7 - return [ a ]; + return [ host ]; } export const abi = getAbi(); -export const arch = getArch(); +export const host = getHost(); export const targets = getTargets();