From efe71e9e31bb56c3b6e488138bffeb51b097ce71 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Wed, 8 Aug 2018 17:04:01 +0100 Subject: [PATCH] build: Don't set `-fno-threadsafe-statics` on macOS This flag is not set on other platforms so it can produce inconsistent behaviour across platforms. For example, if you build an async node add-on which uses statics you can get race conditions due to static not supporting threads if the node add-on inherits from the Node common.gypi config. It is not disabled on other platforms such as Linux, it is not disabled by default in Xcode or clang. This setting has been there since the initial commit that introduces `common.gypi` and thus has been there since the start, it doesn't seem to be have added for any particular reason other than to potentially match the Xcode defaults at the time. PR-URL: https://github.com/nodejs/node/pull/22198 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- common.gypi | 1 - 1 file changed, 1 deletion(-) diff --git a/common.gypi b/common.gypi index 1940e3fabbced4..3d3246a7105823 100644 --- a/common.gypi +++ b/common.gypi @@ -447,7 +447,6 @@ 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings - 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics 'PREBINDING': 'NO', # No -Wl,-prebind 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacosx-version-min=10.7 'USE_HEADERMAP': 'NO',