Skip to content

Commit 2e56c91

Browse files
gabylbjoeferner
authored andcommitted
zos: set compiler flags based on compiler and node versions
This is to workaround previous (to v14) versions of node and a compiler bug affected by those versions, as follows: - v8 (ships with D190508), requires -U_VARARG_EXT_ and no-opt - v12 (ships with D191122), requires no-opt - v14 (ships with D191122), no workaround needed.
1 parent ab035d0 commit 2e56c91

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

binding.gyp

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
['OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
2525
'javalibdir%': "<!(./find_java_libdir.sh <(target_arch) <(OS))"
2626
}],
27+
['OS=="zos"', {
28+
'nodever%': '<!(node -e "console.log(process.versions.node)" | cut -d"." -f1)',
29+
}],
2730
]
2831
},
2932
'targets': [
@@ -101,9 +104,22 @@
101104
]
102105
}
103106
],
104-
["OS=='zos'", {
105-
"cflags!": [ "-O2", "-O3" ]
106-
}],
107+
['OS=="zos"',
108+
{
109+
'conditions': [
110+
['nodever<14',
111+
{
112+
'cflags!': [ "-O2", "-O3" ]
113+
}
114+
],
115+
['nodever<12',
116+
{
117+
'cflags': [ "-U_VARARG_EXT_" ],
118+
}
119+
]
120+
]
121+
}
122+
],
107123
['OS=="mac"',
108124
{
109125
'xcode_settings': {

0 commit comments

Comments
 (0)