Skip to content

Commit 4a9ce15

Browse files
authored
Merge pull request #513 from zeromq/exceptions
2 parents 1aedf28 + 83bc414 commit 4a9ce15

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

binding.gyp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@
8686
'configurations': {
8787
'Debug': {
8888
'defines': ['NAPI_CPP_EXCEPTIONS', 'DEBUG', '_DEBUG'],
89+
'cflags_cc!': [
90+
"-fno-exceptions",
91+
],
92+
"cflags_cc": [
93+
"-fexceptions"
94+
],
8995
'conditions': [
9096
['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
9197
'cflags_cc!': [
@@ -161,7 +167,13 @@
161167

162168
'Release': {
163169
'defines': [
164-
'NAPI_DISABLE_CPP_EXCEPTIONS',
170+
'NAPI_CPP_EXCEPTIONS',
171+
],
172+
'cflags_cc!': [
173+
"-fno-exceptions",
174+
],
175+
"cflags_cc": [
176+
"-fexceptions",
165177
],
166178
'conditions': [
167179
['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
@@ -200,6 +212,7 @@
200212
'RuntimeLibrary': 2,
201213
'AdditionalOptions': [
202214
'-std:c++17',
215+
'/EHsc'
203216
],
204217
},
205218
'VCLinkerTool': {

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@
7171
],
7272
"scripts": {
7373
"install": "node-gyp-build",
74-
"clean": "shx rm -rf build lib libzmq tmp zmq && shx mkdir -p tmp && shx touch tmp/.gitkeep",
74+
"clean": "shx rm -rf build lib libzmq tmp zmq prebuilds && shx mkdir -p tmp && shx touch tmp/.gitkeep",
7575
"build.js": "tsc --project tsconfig-build.json && node script/ci/downlevel-dts.js",
7676
"build.doc": "typedoc --out docs --name zeromq.js --excludeProtected --excludePrivate --excludeNotExported --excludeExternals --externalPattern 'src/+(draft|native|compat).ts' --tsconfig tsconfig-build.json --mode file",
7777
"prebuild": "ts-node -P ./tsconfig.json ./script/prebuild.ts",
78-
"build.native": "prebuildify --napi --build-from-source --debug",
78+
"build.native": "prebuildify --napi --build-from-source",
7979
"build.native.debug": "npm run build.native -- --debug",
8080
"build": "npm run build.js && npm run build.native",
81-
"test": "npm run build.js && mocha",
81+
"build.debug": "npm run build.js && npm run build.native.debug",
82+
"test": "npm run build.debug && mocha",
8283
"lint": "sh script/lint.sh",
8384
"bench": "node --expose-gc test/bench"
8485
},

tmp/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)