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