|
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.")
|
|
413 | 416 |
|
414 | 417 | parser.add_argument_group(shared_optgroup)
|
415 | 418 |
|
| 419 | +static_optgroup.add_argument('--static-zoslib-gyp', |
| 420 | + action='store', |
| 421 | + dest='static_zoslib_gyp', |
| 422 | + help='path to zoslib.gyp file for includes and to link to static zoslib libray') |
| 423 | + |
| 424 | +parser.add_argument_group(static_optgroup) |
| 425 | + |
416 | 426 | parser.add_argument('--systemtap-includes',
|
417 | 427 | action='store',
|
418 | 428 | dest='systemtap_includes',
|
@@ -859,7 +869,11 @@ def try_check_compiler(cc, lang):
|
859 | 869 | proc.stdin.write(b'__clang__ __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__ '
|
860 | 870 | b'__clang_major__ __clang_minor__ __clang_patchlevel__')
|
861 | 871 |
|
862 |
| - values = (to_utf8(proc.communicate()[0]).split() + ['0'] * 7)[0:7] |
| 872 | + if sys.platform == 'zos': |
| 873 | + values = (to_utf8(proc.communicate()[0]).split('\n')[-2].split() + ['0'] * 7)[0:7] |
| 874 | + else: |
| 875 | + values = (to_utf8(proc.communicate()[0]).split() + ['0'] * 7)[0:7] |
| 876 | + |
863 | 877 | is_clang = values[0] == '1'
|
864 | 878 | gcc_version = tuple(map(int, values[1:1+3]))
|
865 | 879 | clang_version = tuple(map(int, values[4:4+3])) if is_clang else None
|
@@ -1046,6 +1060,8 @@ def is_arm_hard_float_abi():
|
1046 | 1060 | def host_arch_cc():
|
1047 | 1061 | """Host architecture check using the CC command."""
|
1048 | 1062 |
|
| 1063 | + if sys.platform.startswith('zos'): |
| 1064 | + return 's390x' |
1049 | 1065 | k = cc_macros(os.environ.get('CC_host'))
|
1050 | 1066 |
|
1051 | 1067 | matchup = {
|
@@ -1131,6 +1147,14 @@ def configure_mips(o, target_arch):
|
1131 | 1147 | host_byteorder = 'little' if target_arch in ('mipsel', 'mips64el') else 'big'
|
1132 | 1148 | o['variables']['v8_host_byteorder'] = host_byteorder
|
1133 | 1149 |
|
| 1150 | +def configure_zos(o): |
| 1151 | + o['variables']['node_static_zoslib'] = b(True) |
| 1152 | + if options.static_zoslib_gyp: |
| 1153 | + # Apply to all Node.js components for now |
| 1154 | + o['include_dirs'] += [os.path.dirname(options.static_zoslib_gyp) + '/include'] |
| 1155 | + else: |
| 1156 | + raise Exception('--static-zoslib-gyp=<path to zoslib.gyp file> is required.') |
| 1157 | + |
1134 | 1158 | def clang_version_ge(version_checked):
|
1135 | 1159 | for compiler in [(CC, 'c'), (CXX, 'c++')]:
|
1136 | 1160 | ok, is_clang, clang_version, gcc_version = \
|
@@ -1200,6 +1224,8 @@ def configure_node(o):
|
1200 | 1224 | configure_arm(o)
|
1201 | 1225 | elif target_arch in ('mips', 'mipsel', 'mips64el'):
|
1202 | 1226 | configure_mips(o, target_arch)
|
| 1227 | + elif sys.platform == 'zos': |
| 1228 | + configure_zos(o) |
1203 | 1229 |
|
1204 | 1230 | if flavor == 'aix':
|
1205 | 1231 | o['variables']['node_target_type'] = 'static_library'
|
@@ -1312,6 +1338,8 @@ def configure_node(o):
|
1312 | 1338 | shlib_suffix = '%s.dylib'
|
1313 | 1339 | elif sys.platform.startswith('aix'):
|
1314 | 1340 | shlib_suffix = '%s.a'
|
| 1341 | + elif sys.platform.startswith('zos'): |
| 1342 | + shlib_suffix = '%s.x' |
1315 | 1343 | else:
|
1316 | 1344 | shlib_suffix = 'so.%s'
|
1317 | 1345 | if '%s' in shlib_suffix:
|
@@ -1402,6 +1430,8 @@ def configure_v8(o):
|
1402 | 1430 | o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp.
|
1403 | 1431 | if options.without_bundled_v8 and options.enable_d8:
|
1404 | 1432 | raise Exception('--enable-d8 is incompatible with --without-bundled-v8.')
|
| 1433 | + if options.static_zoslib_gyp: |
| 1434 | + o['variables']['static_zoslib_gyp'] = options.static_zoslib_gyp |
1405 | 1435 |
|
1406 | 1436 |
|
1407 | 1437 | def configure_openssl(o):
|
@@ -1805,6 +1835,9 @@ def icu_download(path):
|
1805 | 1835 | elif sys.platform.startswith('aix'):
|
1806 | 1836 | icu_config['variables']['icu_asm_ext'] = 'S'
|
1807 | 1837 | icu_config['variables']['icu_asm_opts'] = [ '-a', 'xlc' ]
|
| 1838 | + elif sys.platform == 'zos': |
| 1839 | + icu_config['variables']['icu_asm_ext'] = 'S' |
| 1840 | + icu_config['variables']['icu_asm_opts'] = [ '-a', 'zos' ] |
1808 | 1841 | else:
|
1809 | 1842 | # assume GCC-compatible asm is OK
|
1810 | 1843 | icu_config['variables']['icu_asm_ext'] = 'S'
|
|
0 commit comments