com php-src: Don't build JIT if the host architecture doesn't support it: ext/opcache/config.m4 ext/opcache/zend_accelerator_module .c

From: Date: Thu, 11 Apr 2019 10:05:41 +0000
Subject: com php-src: Don't build JIT if the host architecture doesn't support it: ext/opcache/config.m4 ext/opcache/zend_accelerator_module .c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-105639@lists.php.net to get a copy of this message
Commit: b2fb753e85ce36ffd0141013a6eccbf0043d7392 Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 11 Apr 2019 12:05:41 +0200 Parents: ee45565a2a6c359d4e80d6e04c8e047c85d6a2af Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b2fb753e85ce36ffd0141013a6eccbf0043d7392 Log: Don't build JIT if the host architecture doesn't support it Also display in phpinfo() whether JIT is unavailable/disabled/enabled. Changed paths: M ext/opcache/config.m4 M ext/opcache/zend_accelerator_module.c Diff: diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index b4a1f0f..d5c63d2 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -30,6 +30,17 @@ if test "$PHP_OPCACHE" != "no"; then fi if test "$PHP_OPCACHE_JIT" = "yes"; then + case $host_cpu in + x86*) + ;; + *) + AC_MSG_WARN([JIT not supported by host architecture]) + PHP_OPCACHE_JIT=no + ;; + esac + fi + + if test "$PHP_OPCACHE_JIT" = "yes"; then AC_DEFINE(HAVE_JIT, 1, [Define to enable JIT]) ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c" diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index 0eda811..a439c97 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -464,6 +464,15 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS) } else { php_info_print_table_row(2, "File Cache", "Disabled"); } +#if HAVE_JIT + if (ZCG(accel_directives).jit) { + php_info_print_table_row(2, "JIT", "Enabled"); + } else { + php_info_print_table_row(2, "JIT", "Disabled"); + } +#else + php_info_print_table_row(2, "JIT", "Not Available"); +#endif if (file_cache_only) { if (!accel_startup_ok || zps_api_failure_reason) { php_info_print_table_row(2, "Startup Failed", zps_api_failure_reason);

« previous php.cvs (#105639) next »