Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 26 additions & 32 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@
['OS=="linux" or OS=="openharmony"', {
'node_section_ordering_info%': ''
}],
['OS == "zos"', {
# use ICU data file on z/OS
'icu_use_data_file_flag%': 1
}]
],
},

Expand Down Expand Up @@ -227,11 +223,7 @@
# pull in V8's postmortem metadata
'ldflags': [ '-Wl,-z,allextract' ]
}],
['OS=="zos"', {
# increase performance, number from experimentation
'cflags': [ '-qINLINE=::150:100000' ]
}],
['OS!="mac" and OS!="win" and OS!="zos"', {
['OS!="mac" and OS!="win"', {
# -fno-omit-frame-pointer is necessary for the --perf_basic_prof
# flag to work correctly. perf(1) gets confused about JS stack
# frames otherwise, even with --call-graph dwarf.
Expand Down Expand Up @@ -485,7 +477,7 @@
[ 'target_arch=="arm64"', {
'msvs_configuration_platform': 'arm64',
}],
['asan == 1 and OS != "mac" and OS != "zos"', {
['asan == 1 and OS != "mac"', {
'cflags+': [
'-fno-omit-frame-pointer',
'-fsanitize=address',
Expand Down Expand Up @@ -513,7 +505,7 @@
}],
],
}],
['ubsan == 1 and OS != "mac" and OS != "zos"', {
['ubsan == 1 and OS != "mac"', {
'cflags+': [
'-fno-omit-frame-pointer',
'-fsanitize=undefined',
Expand Down Expand Up @@ -596,11 +588,11 @@
'NOMINMAX',
],
}],
[ 'OS in "linux freebsd openbsd solaris aix os400 openharmony"', {
[ 'OS in "linux freebsd openbsd solaris aix os400 openharmony zos"', {
'cflags': [ '-pthread' ],
'ldflags': [ '-pthread' ],
}],
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi openharmony"', {
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi openharmony zos"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
'cflags_cc': [
'-fno-rtti',
Expand All @@ -619,6 +611,9 @@
'cflags': [ '-I/usr/local/include' ],
'ldflags': [ '-Wl,-z,wxneeded' ],
}],
[ 'OS=="zos"', {
'ldflags!': [ '-rdynamic' ],
}],
['_toolset=="host"', {
'conditions': [
[ 'host_arch=="ia32"', {
Expand Down Expand Up @@ -837,47 +832,46 @@
}],
['OS == "zos"', {
'defines': [
'ZOSLIB_OVERRIDE_CLIB',
'ZOSLIB_ALIGNED_NEWDEL',
'_XOPEN_SOURCE_EXTENDED',
'_XOPEN_SOURCE=600',
'_UNIX03_THREADS',
'_UNIX03_WITHDRAWN',
'_UNIX03_SOURCE',
'_OPEN_SYS_SOCK_IPV6',
'_OPEN_SYS_FILE_EXT=1',
'_POSIX_C_SOURCE=200809L',
'_POSIX_SOURCE',
'_OPEN_SYS',
'_OPEN_SYS_IF_EXT',
'_OPEN_SYS_SOCK_IPV6',
'_OPEN_MSGQ_EXT',
'_LARGE_TIME_API',
'_ALL_SOURCE',
'_AE_BIMODAL=1',
'__IBMCPP_TR1__',
'_EXT',
'NODE_PLATFORM="os390"',
'PATH_MAX=1024',
'_ENHANCED_ASCII_EXT=0xFFFFFFFF',
'_Export=extern',
'__static_assert=static_assert',
],
'cflags': [
'-q64',
'-Wc,DLL',
'-Wa,GOFF',
'-qARCH=10',
'-qASCII',
'-qTUNE=12',
'-qENUM=INT',
'-qEXPORTALL',
'-qASM',
],
'cflags_cc': [
'-qxclang=-std=c++14',
'-fno-short-enums',
'-fno-xl-pragma-pack',
'-fstack-protector',
'-fvisibility=default',
'-fzos-le-char-mode=ascii',
'-m64',
'-march=z14',
'-mzos-target=zosv2r5',
],
'ldflags': [
'-q64',
'-m64',
'-mzos-target=zosv2r5',
],
# for addons due to v8config.h include of "zos-base.h":
'include_dirs': ['<(zoslib_include_dir)'],
'include_dirs': [
'<(zoslib_include_dir)',
'<(zoslib_include_dir)/include-wrappers/c++',
],
}],
],
}
Expand Down
15 changes: 8 additions & 7 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@
static_optgroup.add_argument('--static-zoslib-gyp',
action='store',
dest='static_zoslib_gyp',
help='path to zoslib.gyp file for includes and to link to static zoslib library')
help='path to zoslib.gyp file for includes and to link to static zoslib libraries')

parser.add_argument('--tag',
action='store',
Expand Down Expand Up @@ -1865,12 +1865,13 @@ def configure_mips(o, target_arch):
o['variables']['v8_host_byteorder'] = host_byteorder

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['variables']['zoslib_include_dir'] = Path(options.static_zoslib_gyp).parent / 'include'
if os.environ.get('ZOSLIB_INCLUDES'):
o['variables']['zoslib_include_dir'] = os.environ.get('ZOSLIB_INCLUDES')
o['include_dirs'] += [o['variables']['zoslib_include_dir']]
else:
raise Exception('Environment variable ZOSLIB_INCLUDES=<path to zoslib/include dir> is required.')

if not options.static_zoslib_gyp:
raise Exception('--static-zoslib-gyp=<path to zoslib.gyp file> is required.')

def clang_version_ge(version_checked):
Expand Down Expand Up @@ -2795,8 +2796,8 @@ def icu_download(path):
icu_config['variables']['icu_asm_ext'] = 'S'
icu_config['variables']['icu_asm_opts'] = [ '-a', 'xlc' ]
elif sys.platform == 'zos':
icu_config['variables']['icu_asm_ext'] = 'S'
icu_config['variables']['icu_asm_opts'] = [ '-a', 'zos' ]
icu_config['variables']['icu_asm_ext'] = 'c'
icu_config['variables']['icu_asm_opts'] = []
else:
# assume GCC-compatible asm is OK
icu_config['variables']['icu_asm_ext'] = 'S'
Expand Down
Loading