Skip to content

Commit e132b36

Browse files
committed
fix: use conditionals in node-gyp for overriding compiler and cxxflags on the mac
1 parent 5c921b7 commit e132b36

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

binding.gyp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
2+
'conditions': [
3+
['OS=="mac"', {
4+
'make_global_settings': [
5+
['CC', '/usr/bin/gcc'],
6+
['CXX', '/usr/bin/g++']
7+
]
8+
}]],
29
"targets": [
310
{
411
"target_name": "mysql_bindings",
@@ -16,6 +23,13 @@
1623
'cflags_cc!': [
1724
'-fno-exceptions'
1825
],
26+
'conditions': [
27+
['OS=="mac"', {
28+
'xcode_settings': {
29+
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
30+
'GCC_ENABLE_CPP_RTTI': 'YES'
31+
}
32+
}]],
1933
"sources": [
2034
"lib/node-db/exception.cc",
2135
"lib/node-db/binding.cc",

0 commit comments

Comments
 (0)