From 0969552a9d44e929e93baab1fb938500b89871d0 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Sat, 19 Oct 2019 15:44:05 +0200 Subject: [PATCH] Try out -fvisibility=hidden for mac Ref #686, #687. --- binding.gyp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/binding.gyp b/binding.gyp index 63c59975..43cbf744 100644 --- a/binding.gyp +++ b/binding.gyp @@ -19,6 +19,12 @@ "cflags": [], "cflags!": [ "-fno-tree-vrp"] }], + ["OS == 'mac'", { + "cflags+": ["-fvisibility=hidden"], + "xcode_settings": { + "GCC_SYMBOLS_PRIVATE_EXTERN": "YES" # -fvisibility=hidden + } + }], ["OS == 'android'", { "cflags": [ "-fPIC" ], "ldflags": [ "-fPIC" ],