在 2025-02-10 21:24, Martin Storsjö 写道:
If translation units that use thread local variables are built with LTO (using native TLS, not emulated TLS), then the implicit access to _tls_index isn't visible on the LTO object file level.Therefore, mark _tls_index as used, so that it gets retained through LTO. This fixes linking user code with LTO, if the base CRT files also are built with LTO enabled. This is similar to 7ef0ba478f664a78a8509c81d5e40a34e821ac8c which marked _tls_used as used too. Signed-off-by: Martin Storsjö <mar...@martin.st> --- mingw-w64-crt/crt/tlssup.c | 1 + 1 file changed, 1 insertion(+)
LGTM. Thanks. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public