mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00
feat: Add proper support for IBM i
Python 3.9 on IBM i now properly returns "os400" for sys.platform instead of claiming to be AIX as it did previously. While the IBM i PASE environment is compatible with AIX, it is a subset and has numerous differences which makes it beneficial to distinguish, however this means that it now needs explicit support here.
This commit is contained in:
parent
3e2a5324f1
commit
a26494fbb8
4 changed files with 12 additions and 5 deletions
|
@ -103,6 +103,11 @@
|
|||
'-Wl,-bimport:<(node_exp_file)'
|
||||
],
|
||||
}],
|
||||
[ 'OS=="os400"', {
|
||||
'ldflags': [
|
||||
'-Wl,-bimport:<(node_exp_file)'
|
||||
],
|
||||
}],
|
||||
[ 'OS=="zos"', {
|
||||
'cflags': [
|
||||
'-q64',
|
||||
|
|
|
@ -11,6 +11,8 @@ function build (gyp, argv, callback) {
|
|||
var platformMake = 'make'
|
||||
if (process.platform === 'aix') {
|
||||
platformMake = 'gmake'
|
||||
} else if (process.platform === 'os400') {
|
||||
platformMake = 'gmake'
|
||||
} else if (process.platform.indexOf('bsd') !== -1) {
|
||||
platformMake = 'gmake'
|
||||
} else if (win && argv.length > 0) {
|
||||
|
|
|
@ -176,12 +176,12 @@ function configure (gyp, argv, callback) {
|
|||
// For AIX and z/OS we need to set up the path to the exports file
|
||||
// which contains the symbols needed for linking.
|
||||
var nodeExpFile
|
||||
if (process.platform === 'aix' || process.platform === 'os390') {
|
||||
var ext = process.platform === 'aix' ? 'exp' : 'x'
|
||||
if (process.platform === 'aix' || process.platform === 'os390' || process.platform === 'os400') {
|
||||
var ext = process.platform === 'os390' ? 'x' : 'exp'
|
||||
var nodeRootDir = findNodeDirectory()
|
||||
var candidates
|
||||
|
||||
if (process.platform === 'aix') {
|
||||
if (process.platform === 'aix' || process.platform === 'os400') {
|
||||
candidates = [
|
||||
'include/node/node',
|
||||
'out/Release/node',
|
||||
|
@ -276,7 +276,7 @@ function configure (gyp, argv, callback) {
|
|||
argv.push('-Dlibrary=shared_library')
|
||||
argv.push('-Dvisibility=default')
|
||||
argv.push('-Dnode_root_dir=' + nodeDir)
|
||||
if (process.platform === 'aix' || process.platform === 'os390') {
|
||||
if (process.platform === 'aix' || process.platform === 'os390' || process.platform === 'os400') {
|
||||
argv.push('-Dnode_exp_file=' + nodeExpFile)
|
||||
if (process.platform === 'os390' && zoslibIncDir) {
|
||||
argv.push('-Dzoslib_include_dir=' + zoslibIncDir)
|
||||
|
|
|
@ -4,7 +4,7 @@ const test = require('tap').test
|
|||
const path = require('path')
|
||||
const findNodeDirectory = require('../lib/find-node-directory')
|
||||
|
||||
const platforms = ['darwin', 'freebsd', 'linux', 'sunos', 'win32', 'aix']
|
||||
const platforms = ['darwin', 'freebsd', 'linux', 'sunos', 'win32', 'aix', 'os400']
|
||||
|
||||
// we should find the directory based on the directory
|
||||
// the script is running in and it should match the layout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue