Skip to content

Commit

Permalink
fix: enable the cpp exception in the release build
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Sep 5, 2022
1 parent 2f976d8 commit 0504240
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

'configurations': {
'Debug': {
'defines': ['NAPI_CPP_EXCEPTIONS', 'DEBUG', '_DEBUG'],
'defines': ['NAPI_CPP_EXCEPTIONS', "-fexceptions", 'DEBUG', '_DEBUG'],
'conditions': [
['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
'cflags_cc!': [
Expand Down Expand Up @@ -161,7 +161,8 @@

'Release': {
'defines': [
'NAPI_DISABLE_CPP_EXCEPTIONS',
'NAPI_CPP_EXCEPTIONS',
"-fexceptions"
],
'conditions': [
['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
Expand Down Expand Up @@ -200,6 +201,7 @@
'RuntimeLibrary': 2,
'AdditionalOptions': [
'-std:c++17',
'/EHsc'
],
},
'VCLinkerTool': {
Expand Down

0 comments on commit 0504240

Please sign in to comment.