Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set -fno-threadsafe-statics on macOS as build option #22198

Closed

Conversation

kylef
Copy link
Contributor

@kylef kylef commented Aug 8, 2018

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 so it has been present 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.

Checklist

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.
@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Aug 8, 2018
@addaleax addaleax added lts-watch-v8.x author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Aug 8, 2018
@addaleax
Copy link
Member

addaleax commented Aug 8, 2018

@Trott
Copy link
Member

Trott commented Aug 9, 2018

@nodejs/platform-macos

@kylef kylef changed the title build: Don't set -fno-threadsafe-statics on macOS Don't set -fno-threadsafe-statics on macOS as build option Aug 23, 2018
@addaleax
Copy link
Member

Landed in 3ba54e4

@addaleax addaleax closed this Aug 23, 2018
addaleax pushed a commit that referenced this pull request Aug 23, 2018
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 <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@kylef kylef deleted the kylef/no-disable-thread-safe-static branch August 23, 2018 23:16
targos pushed a commit that referenced this pull request Aug 24, 2018
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 <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Sep 3, 2018
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 <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. build Issues and PRs related to build files or the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants