Uh oh!
There was an error while loading. Please reload this page.
Workaround inefficient codegen for thread statics in latest MSVC - #33347
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Wraith2
commented
Mar 8, 2020
I don't doubt the quality but could you explain the problem this fixes for those of playing along at home? |
AaronRobinsonMSFT
commented
Mar 8, 2020
@Wraith2 This was a bit surprising but the general gist here is the We are working offline with the VC++ team to understand why this dynamic initialization is occurring now since it wasn't occurring using the previous tool chain (i.e. VS2017). |
Wraith2
commented
Mar 8, 2020
Thanks 😁 |
GetThread() is no longer getting in latest MSVC and includes unnecessary call to __dyn_tls_on_demand_init. Removing the extern "C" and applying a __declspec(selectany) makes the compiler to generate same code as before. Fixes for #33341
Fixes for #33341