-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Conversation
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"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
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 :)
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.