Skip to content

Fix GH-16839: Error on building Opcache JIT for Windows ARM64 #16841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Nov 17, 2024

OPcache JIT does not support Windows ARM64, so we should not allow --enable-opcache-jit in the first place.

Due to the way ARG_ENABLE() is handled on Windows, we do not attempt to suppress the configure option, but just do not enable JIT when the user attempts to, and adapt the help text.

OPcache JIT does not support Windows ARM64, so we should not allow
`--enable-opcache-jit` in the first place.

Due to the way `ARG_ENABLE()` is handled on Windows, we do not attempt
to suppress the configure option, but just do not enable JIT when the
user attempts to, and adapt the help text.
@@ -23,7 +23,9 @@ if (PHP_OPCACHE != "no") {
ADD_EXTENSION_DEP('opcache', 'pcre');

if (PHP_OPCACHE_JIT == "yes") {
if (CHECK_HEADER_ADD_INCLUDE("ir/ir.h", "CFLAGS_OPCACHE", PHP_OPCACHE + ";ext\\opcache\\jit")) {
if (TARGET_ARCH == 'arm64') {
WARNING("JIT not enabled; not yet supported for ARM64");
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on https://github.com/dstogov/ir/tree/master/dynasm I was under the impression ARM is supported, so it isn't or only ARM on Windows?

Copy link
Member Author

Choose a reason for hiding this comment

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

Supported is only aarch64 on POSIX systems. See #16839 (comment) f.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps it might be wise to specify in the warning message that JIT is not support on ARM64 on Windows (indicating that it is supported on POSIX systems)

Copy link
Member Author

Choose a reason for hiding this comment

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

This file is part of the Windows build chain; it is not used for building on POSIX systems.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well yeah, but the warning is meant for humans

Copy link
Member Author

Choose a reason for hiding this comment

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

$ configure --with-toolset=gcc
PHP Version: 8.5.0-dev

Saving configure options to config.nice.bat
ERROR: Unsupported toolset 'gcc'

Copy link
Contributor

Choose a reason for hiding this comment

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

My point was that the warning could be misinterpreted by windows-only developers who don't know much about JIT, leding them to think that JIT is not supported at all on arm64, when they could be instead directed to use WSL, where JIT is available, but ah well :)

@cmb69 cmb69 closed this in e44b762 Nov 18, 2024
@cmb69 cmb69 deleted the cmb/gh16839 branch November 18, 2024 22:36
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.

Error on building Opcache JIT for Windows ARM64
4 participants