add support for freebsd
This commit is contained in:
parent
3b20fa0bdf
commit
058f1f26b1
@ -54,7 +54,8 @@ async function compileOnUnix (nodeVersion, targetArch) {
|
||||
armv6: 'arm', armv7: 'arm' }[targetArch];
|
||||
args.push('--dest-cpu', cpu);
|
||||
await spawn('./configure', args, { cwd: nodePath });
|
||||
const promise = spawn('make', [], { cwd: nodePath });
|
||||
const make = process.platform === 'freebsd' ? 'gmake' : 'make';
|
||||
const promise = spawn(make, [], { cwd: nodePath });
|
||||
progress(promise, thresholds('make', nodeVersion));
|
||||
await promise;
|
||||
return path.join(nodePath, 'out/Release/node');
|
||||
|
||||
@ -25,7 +25,7 @@ function getHostPlatform () {
|
||||
}
|
||||
|
||||
function getKnownPlatforms () {
|
||||
return [ 'linux', 'macos', 'win' ];
|
||||
return [ 'freebsd', 'linux', 'macos', 'win' ];
|
||||
}
|
||||
|
||||
export function toFancyArch (arch) {
|
||||
|
||||
@ -18,6 +18,9 @@ function dontBuild (nodeVersion, targetArch) {
|
||||
// official node 0.12 does not compile on arm
|
||||
if (/^v?0/.test(nodeVersion) &&
|
||||
/^arm/.test(targetArch)) return true;
|
||||
// some obstacles on freebsd
|
||||
if (/^v?0/.test(nodeVersion) &&
|
||||
hostPlatform === 'freebsd') return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user