Skip to content
Closed
Prev Previous commit
Next Next commit
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.
  • Loading branch information
gabylb committed Jun 26, 2020
commit 6c172799e47546a26de3f9155849e30307282693
22 changes: 19 additions & 3 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
['OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
'javalibdir%': "<!(./find_java_libdir.sh <(target_arch) <(OS))"
}],
['OS=="zos"', {
'nodever%': '<!(node -e "console.log(process.versions.node)" | cut -d"." -f1)',
}],
]
},
'targets': [
Expand Down Expand Up @@ -101,9 +104,22 @@
]
}
],
["OS=='zos'", {
"cflags!": [ "-O2", "-O3" ]
}],
['OS=="zos"',
{
'conditions': [
['nodever<14',
{
'cflags!': [ "-O2", "-O3" ]
}
],
['nodever<12',
{
'cflags': [ "-U_VARARG_EXT_" ],
}
]
]
}
],
['OS=="mac"',
{
'xcode_settings': {
Expand Down