Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Commit 59fee3a

Browse files
committed
Hide symbols on mac with -fvisibility=hidden
See Level/leveldown#688
1 parent 949afd2 commit 59fee3a

1 file changed

Lines changed: 17 additions & 15 deletions

File tree

binding.gyp

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,24 @@
2727
, 'cflags_cc+': [ '-frtti' ]
2828
}]
2929
, ["OS == 'mac'", {
30+
"cflags+": ["-fvisibility=hidden"],
3031
'xcode_settings': {
31-
'WARNING_CFLAGS': [
32-
'-Wno-sign-compare'
33-
, '-Wno-unused-variable'
34-
, '-Wno-unused-function'
35-
, '-Wno-ignored-qualifiers'
36-
]
37-
, 'OTHER_CPLUSPLUSFLAGS': [
38-
'-mmacosx-version-min=10.8'
39-
, '-std=c++11'
40-
, '-stdlib=libc++'
41-
]
42-
, 'OTHER_LDFLAGS': ['-stdlib=libc++']
43-
, 'GCC_ENABLE_CPP_RTTI': 'YES'
44-
, 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
45-
, 'MACOSX_DEPLOYMENT_TARGET': '10.8'
32+
"GCC_SYMBOLS_PRIVATE_EXTERN": "YES" # -fvisibility=hidden
33+
, 'WARNING_CFLAGS': [
34+
'-Wno-sign-compare'
35+
, '-Wno-unused-variable'
36+
, '-Wno-unused-function'
37+
, '-Wno-ignored-qualifiers'
38+
]
39+
, 'OTHER_CPLUSPLUSFLAGS': [
40+
'-mmacosx-version-min=10.8'
41+
, '-std=c++11'
42+
, '-stdlib=libc++'
43+
]
44+
, 'OTHER_LDFLAGS': ['-stdlib=libc++']
45+
, 'GCC_ENABLE_CPP_RTTI': 'YES'
46+
, 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
47+
, 'MACOSX_DEPLOYMENT_TARGET': '10.8'
4648
}
4749
}]
4850
, ['OS == "linux"', {

0 commit comments

Comments
 (0)