build: use zoslib_include_dir provided by node-gyp

The path is based on the zoslib gyp path passed to configure.py
via --static-zoslib-gyp arg.

PR-URL: https://github.com/nodejs/node/pull/41713
Co-authored-by: Gaby Baghdadi <baghdadi@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
alexcfyung 2022-02-15 06:51:52 -05:00 committed by GitHub
parent ee38bbd4cf
commit e0fa7e0608
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -615,7 +615,7 @@
'-q64',
],
# for addons due to v8config.h include of "zos-base.h":
'include_dirs': ['$(ZOSLIB_INCLUDES)'],
'include_dirs': ['<(zoslib_include_dir)'],
}],
],
}

View File

@ -1159,7 +1159,8 @@ def configure_zos(o):
o['variables']['node_static_zoslib'] = b(True)
if options.static_zoslib_gyp:
# Apply to all Node.js components for now
o['include_dirs'] += [os.path.dirname(options.static_zoslib_gyp) + '/include']
o['variables']['zoslib_include_dir'] = os.path.dirname(options.static_zoslib_gyp) + '/include'
o['include_dirs'] += [o['variables']['zoslib_include_dir']]
else:
raise Exception('--static-zoslib-gyp=<path to zoslib.gyp file> is required.')