Skip to content

Commit

Permalink
bring back tls_InlinedThreadStatics on Windows temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
VSadov committed Jun 8, 2023
1 parent 9dd0ec3 commit 65ca15b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/coreclr/nativeaot/Runtime/threadstore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,12 @@ __thread ThreadBuffer tls_CurrentThread;
__thread InlinedThreadStaticRoot tls_InlinedThreadStatics;
#endif

#else
// the root of inlined threadstatics storage
// there is only one now,
// eventually this will be emitted by ILC and we may have more than one such variable
EXTERN_C __declspec(thread) InlinedThreadStaticRoot tls_InlinedThreadStatics;
__declspec(thread) InlinedThreadStaticRoot tls_InlinedThreadStatics;
#endif

EXTERN_C ThreadBuffer* RhpGetThread()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ public virtual void AttachToDependencyGraph(DependencyAnalyzerBase<NodeFactory>
graph.AddRoot(EagerCctorTable, "EagerCctorTable is always generated");
graph.AddRoot(TypeManagerIndirection, "TypeManagerIndirection is always generated");

if (!_target.IsOSXLike)
if (!_target.IsOSXLike && !_target.IsWindows)
{
graph.AddRoot(TlsRoot, "TlsRoot is always generated");
}
Expand Down

0 comments on commit 65ca15b

Please sign in to comment.