build: start build on z/OS · nodejs/node@c49a651 · GitHub
Skip to content

Commit c49a651

Browse files
alexcfyungdanielleadams
authored andcommitted
build: start build on z/OS
Update configure.py, Makefile, and common.gypi to get the build started on z/OS. Co-authored-by: Gaby Baghdadi <baghdadi@ca.ibm.com> Co-authored-by: Wayne Zhang <zsw007@gmail.com> PR-URL: #41273 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
1 parent fc38d15 commit c49a651

3 files changed

Lines changed: 97 additions & 4 deletions

File tree

Makefile

Lines changed: 10 additions & 0 deletions

common.gypi

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@
118118
}],
119119
['OS=="linux"', {
120120
'node_section_ordering_info%': ''
121+
}],
122+
['OS == "zos"', {
123+
# use ICU data file on z/OS
124+
'icu_use_data_file_flag%': 1
121125
}]
122126
],
123127
},
@@ -209,7 +213,11 @@
209213
# pull in V8's postmortem metadata
210214
'ldflags': [ '-Wl,-z,allextract' ]
211215
}],
212-
['OS!="mac" and OS!="win"', {
216+
['OS=="zos"', {
217+
# increase performance, number from experimentation
218+
'cflags': [ '-qINLINE=::150:100000' ]
219+
}],
220+
['OS!="mac" and OS!="win" and OS!="zos"', {
213221
'cflags': [ '-fno-omit-frame-pointer' ],
214222
}],
215223
['OS=="linux"', {
@@ -333,7 +341,7 @@
333341
[ 'target_arch=="arm64"', {
334342
'msvs_configuration_platform': 'arm64',
335343
}],
336-
['asan == 1 and OS != "mac"', {
344+
['asan == 1 and OS != "mac" and OS != "zos"', {
337345
'cflags+': [
338346
'-fno-omit-frame-pointer',
339347
'-fsanitize=address',
@@ -425,7 +433,7 @@
425433
'cflags': [ '-m64', '-mminimal-toc' ],
426434
'ldflags': [ '-m64' ],
427435
}],
428-
[ 'target_arch=="s390x"', {
436+
[ 'target_arch=="s390x" and OS=="linux"', {
429437
'cflags': [ '-m64', '-march=z196' ],
430438
'ldflags': [ '-m64', '-march=z196' ],
431439
}],
@@ -572,6 +580,48 @@
572580
'OPENSSL_NO_ASM',
573581
],
574582
}],
583+
['OS == "zos"', {
584+
'defines': [
585+
'_XOPEN_SOURCE_EXTENDED',
586+
'_XOPEN_SOURCE=600',
587+
'_UNIX03_THREADS',
588+
'_UNIX03_WITHDRAWN',
589+
'_UNIX03_SOURCE',
590+
'_OPEN_SYS_SOCK_IPV6',
591+
'_OPEN_SYS_FILE_EXT=1',
592+
'_POSIX_SOURCE',
593+
'_OPEN_SYS',
594+
'_OPEN_SYS_IF_EXT',
595+
'_OPEN_SYS_SOCK_IPV6',
596+
'_OPEN_MSGQ_EXT',
597+
'_LARGE_TIME_API',
598+
'_ALL_SOURCE',
599+
'_AE_BIMODAL=1',
600+
'__IBMCPP_TR1__',
601+
'NODE_PLATFORM="os390"',
602+
'PATH_MAX=1024',
603+
'_ENHANCED_ASCII_EXT=0xFFFFFFFF',
604+
'_Export=extern',
605+
'__static_assert=static_assert',
606+
],
607+
'cflags': [
608+
'-q64',
609+
'-Wc,DLL',
610+
'-Wa,GOFF',
611+
'-qARCH=10',
612+
'-qASCII',
613+
'-qTUNE=12',
614+
'-qENUM=INT',
615+
'-qEXPORTALL',
616+
'-qASM',
617+
],
618+
'cflags_cc': [
619+
'-qxclang=-std=c++14',
620+
],
621+
'ldflags': [
622+
'-q64',
623+
],
624+
}],
575625
],
576626
}
577627
}

configure.py

Lines changed: 34 additions & 1 deletion

0 commit comments

Comments
 (0)