Skip to content

Commit efe71e9

Browse files
kyleftargos
authored andcommitted
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: #22198 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 887c43f commit efe71e9

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

common.gypi

-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@
447447
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
448448
'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
449449
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
450-
'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
451450
'PREBINDING': 'NO', # No -Wl,-prebind
452451
'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacosx-version-min=10.7
453452
'USE_HEADERMAP': 'NO',

0 commit comments

Comments
 (0)