Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: enable zoslib installation on z/OS #41493

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,8 @@
'ldflags': [
'-q64',
],
# for addons due to v8config.h include of "zos-base.h":
'include_dirs': ['$(ZOSLIB_INCLUDES)'],
}],
],
}
Expand Down
14 changes: 14 additions & 0 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ def wanted_v8_headers(files_arg, dest):
files_arg = [name for name in files_arg if name in v8_headers]
action(files_arg, dest)

def wanted_zoslib_headers(files_arg, dest):
import glob
zoslib_headers = glob.glob(zoslibinc + '/*.h')
files_arg = [name for name in files_arg if name in zoslib_headers]
action(files_arg, dest)

action([
'common.gypi',
'config.gypi',
Expand Down Expand Up @@ -262,6 +268,14 @@ def wanted_v8_headers(files_arg, dest):
'deps/zlib/zlib.h',
], 'include/node/')

if sys.platform == 'zos':
zoslibinc = os.environ.get('ZOSLIB_INCLUDES')
if not zoslibinc:
raise RuntimeError('Environment variable ZOSLIB_INCLUDES is not set\n')
if not os.path.isfile(zoslibinc + '/zos-base.h'):
raise RuntimeError('ZOSLIB_INCLUDES is not set to a valid location\n')
subdir_files(zoslibinc, 'include/node/zoslib/', wanted_zoslib_headers)

def run(args):
global node_prefix, install_path, target_defaults, variables

Expand Down