Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Darwin 'constinit thread_local' variables.
Unlike other platforms using ItaniumCXXABI, Darwin does not allow the creation of a thread-wrapper function for a variable in the TU of users. Because of this, it can set the linkage of the thread-local symbol to internal, with the assumption that no TUs other than the one defining the variable will need it. However, constinit thread_local variables do not require the use of the thread-wrapper call, so users reference the variable directly. Thus, it must not be converted to internal, or users will get a link failure. This was a regression introduced by the optimization in 0022382. Differential Revision: https://reviews.llvm.org/D80417 (cherry picked from commit aca3d06)
- Loading branch information
Showing
2 changed files
with
54 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters