Skip to content

Conversation

TimWolla
Copy link
Member

@TimWolla TimWolla commented Oct 4, 2025

No description provided.

@TimWolla
Copy link
Member Author

TimWolla commented Oct 4, 2025

Appears to be blocked on #20064.

Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplicates some code regarding the includes, so I don't particularly like this. Imo it adds more complexity

Copy link
Member

@dstogov dstogov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't do this. I would prefer to keep TSRM as an abstraction layer.

@TimWolla
Copy link
Member Author

TimWolla commented Oct 8, 2025

@nielsdos The duplication arises from the TLS testing files that Arnaud added for static OPcache. Other than that the change remains localized to TSRM.

@dstogov TSRM still remains an abstraction layer for most of the thread-safety support. But it seems useful to me to rely on standardized functionality where possible.


A good think that this PR pointed out: We were apparently not yet building with C11 on Windows. It makes sense to me to ship that independently. Unfortunately my attempt to change that failed, due to ext/intl which needs C++. I'm not seeing how to easily add the /std: flag for everything when not overridden. And I also don't have any Windows experience (or even a Windows machine available). Perhaps @cmb69 can provide some insight?

@cmb69
Copy link
Member

cmb69 commented Oct 9, 2025

C++. I'm not seeing how to easily add the /std: flag for everything when not overridden.

Generally, it might be sensible to distinguish between C and C++ code for Windows/MSVC (like we do on POSIX platforms). Currently, our build system is totally agnostic to that; everything is passed to MSVC, and the compiler decides whether it is C or C++ (based on the file extension), and there is only one set of flags (CFLAGS).

That said, I don't think this will help in this case. If ext-intl (or any other C++ extension) would be build for ZTS, the build would fail, since we can't have C11 atomics in C++ code to my knowledge.

Why not stick with TSRM_TLS anyway?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants