Skip to content

runtime: remove dependency on LLVM_ENABLE_THREADS #31632

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

Merged
merged 1 commit into from
May 7, 2020

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented May 7, 2020

This removes the LLVMSupport usage for thread local. This effectively
is a no-op as the runtime requires that it is built with clang, which
provides the C++11 thread_local support on all the targets. In the
case that the target does not support thread_local, clang would
fallback to __declspec(thread) on MSVC and __thread on other modes.
However, because the runtime is always built in C++14 mode, the
thread_local support should be assumed to be present. Remove the
unnecessary condition and inline the single use of the macro for
thread_local.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

This removes the LLVMSupport usage for thread local.  This effectively
is a no-op as the runtime requires that it is built with clang, which
provides the C++11 `thread_local` support on all the targets.  In the
case that the target does not support `thread_local`, clang would
fallback to `__declspec(thread)` on MSVC and `__thread` on other modes.
However, because the runtime is always built in C++14 mode, the
`thread_local` support should be assumed to be present.  Remove the
unnecessary condition and inline the single use of the macro for
`thread_local`.
@compnerd
Copy link
Member Author

compnerd commented May 7, 2020

CC: @mikeash

@compnerd
Copy link
Member Author

compnerd commented May 7, 2020

@swift-ci please test

@compnerd compnerd merged commit 00ff1c3 into swiftlang:master May 7, 2020
@compnerd compnerd deleted the nyhow-ou-ave-n-problems branch May 7, 2020 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants