|
62 | 62 | "Flags that allows you to control whether you want to build against "
|
63 | 63 | "built-in dependencies or its shared representations. If necessary, "
|
64 | 64 | "provide multiple libraries with comma.")
|
| 65 | +static_optgroup = parser.add_argument_group("Static libraries", |
| 66 | + "Flags that allows you to control whether you want to build against " |
| 67 | + "additional static libraries.") |
65 | 68 | intl_optgroup = parser.add_argument_group("Internationalization",
|
66 | 69 | "Flags that lets you enable i18n features in Node.js as well as which "
|
67 | 70 | "library you want to build against.")
|
|
418 | 421 |
|
419 | 422 | parser.add_argument_group(shared_optgroup)
|
420 | 423 |
|
| 424 | +static_optgroup.add_argument('--static-zoslib-gyp', |
| 425 | + action='store', |
| 426 | + dest='static_zoslib_gyp', |
| 427 | + help='path to zoslib.gyp file for includes and to link to static zoslib libray') |
| 428 | + |
| 429 | +parser.add_argument_group(static_optgroup) |
| 430 | + |
421 | 431 | parser.add_argument('--systemtap-includes',
|
422 | 432 | action='store',
|
423 | 433 | dest='systemtap_includes',
|
@@ -863,7 +873,11 @@ def try_check_compiler(cc, lang):
|
863 | 873 | proc.stdin.write(b'__clang__ __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__ '
|
864 | 874 | b'__clang_major__ __clang_minor__ __clang_patchlevel__')
|
865 | 875 |
|
866 |
| - values = (to_utf8(proc.communicate()[0]).split() + ['0'] * 7)[0:7] |
| 876 | + if sys.platform == 'zos': |
| 877 | + values = (to_utf8(proc.communicate()[0]).split('\n')[-2].split() + ['0'] * 7)[0:7] |
| 878 | + else: |
| 879 | + values = (to_utf8(proc.communicate()[0]).split() + ['0'] * 7)[0:7] |
| 880 | + |
867 | 881 | is_clang = values[0] == '1'
|
868 | 882 | gcc_version = tuple(map(int, values[1:1+3]))
|
869 | 883 | clang_version = tuple(map(int, values[4:4+3])) if is_clang else None
|
@@ -1050,6 +1064,8 @@ def is_arm_hard_float_abi():
|
1050 | 1064 | def host_arch_cc():
|
1051 | 1065 | """Host architecture check using the CC command."""
|
1052 | 1066 |
|
| 1067 | + if sys.platform.startswith('zos'): |
| 1068 | + return 's390x' |
1053 | 1069 | k = cc_macros(os.environ.get('CC_host'))
|
1054 | 1070 |
|
1055 | 1071 | matchup = {
|
@@ -1135,6 +1151,14 @@ def configure_mips(o, target_arch):
|
1135 | 1151 | host_byteorder = 'little' if target_arch in ('mipsel', 'mips64el') else 'big'
|
1136 | 1152 | o['variables']['v8_host_byteorder'] = host_byteorder
|
1137 | 1153 |
|
| 1154 | +def configure_zos(o): |
| 1155 | + o['variables']['node_static_zoslib'] = b(True) |
| 1156 | + if options.static_zoslib_gyp: |
| 1157 | + # Apply to all Node.js components for now |
| 1158 | + o['include_dirs'] += [os.path.dirname(options.static_zoslib_gyp) + '/include'] |
| 1159 | + else: |
| 1160 | + raise Exception('--static-zoslib-gyp=<path to zoslib.gyp file> is required.') |
| 1161 | + |
1138 | 1162 | def clang_version_ge(version_checked):
|
1139 | 1163 | for compiler in [(CC, 'c'), (CXX, 'c++')]:
|
1140 | 1164 | ok, is_clang, clang_version, gcc_version = \
|
@@ -1204,6 +1228,8 @@ def configure_node(o):
|
1204 | 1228 | configure_arm(o)
|
1205 | 1229 | elif target_arch in ('mips', 'mipsel', 'mips64el'):
|
1206 | 1230 | configure_mips(o, target_arch)
|
| 1231 | + elif sys.platform == 'zos': |
| 1232 | + configure_zos(o) |
1207 | 1233 |
|
1208 | 1234 | if flavor == 'aix':
|
1209 | 1235 | o['variables']['node_target_type'] = 'static_library'
|
@@ -1316,6 +1342,8 @@ def configure_node(o):
|
1316 | 1342 | shlib_suffix = '%s.dylib'
|
1317 | 1343 | elif sys.platform.startswith('aix'):
|
1318 | 1344 | shlib_suffix = '%s.a'
|
| 1345 | + elif sys.platform.startswith('zos'): |
| 1346 | + shlib_suffix = '%s.x' |
1319 | 1347 | else:
|
1320 | 1348 | shlib_suffix = 'so.%s'
|
1321 | 1349 | if '%s' in shlib_suffix:
|
@@ -1406,6 +1434,8 @@ def configure_v8(o):
|
1406 | 1434 | o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp.
|
1407 | 1435 | if options.without_bundled_v8 and options.enable_d8:
|
1408 | 1436 | raise Exception('--enable-d8 is incompatible with --without-bundled-v8.')
|
| 1437 | + if options.static_zoslib_gyp: |
| 1438 | + o['variables']['static_zoslib_gyp'] = options.static_zoslib_gyp |
1409 | 1439 |
|
1410 | 1440 |
|
1411 | 1441 | def configure_openssl(o):
|
@@ -1809,6 +1839,9 @@ def icu_download(path):
|
1809 | 1839 | elif sys.platform.startswith('aix'):
|
1810 | 1840 | icu_config['variables']['icu_asm_ext'] = 'S'
|
1811 | 1841 | icu_config['variables']['icu_asm_opts'] = [ '-a', 'xlc' ]
|
| 1842 | + elif sys.platform == 'zos': |
| 1843 | + icu_config['variables']['icu_asm_ext'] = 'S' |
| 1844 | + icu_config['variables']['icu_asm_opts'] = [ '-a', 'zos' ] |
1812 | 1845 | else:
|
1813 | 1846 | # assume GCC-compatible asm is OK
|
1814 | 1847 | icu_config['variables']['icu_asm_ext'] = 'S'
|
|
0 commit comments