GkvJwa e5fe825c13
[Support] On Windows, fix rpmalloc TLS destructor when running inside a DLL (#171465)
This PR fixes a crash on exit in libclang.dll. 

Because the destruction processes for EXEs and DLLs differ on Windows,
DLLs, as modules, require more additional processing in the CRT. When
`RPMALLOC` is enabled, `RPMALLOC data` initializes from the CRT by
calling `rpmalloc_initialize`, but because there's no explicit
`DllMain`, it can't destroy the `RPMALLOC data`. This causes a crash --
which we fix in this patch by adding a `tls callback`.

Fixes #154361 #156052
2025-12-17 12:36:35 -05:00
..