mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
The current function `CHECK_HEADER_ADD_INCLUDE()` automatically defines `HAVE_<HEADER_NAME_H>` preprocessor macros, which makes it difficult to sync with other build systems. Specially, if some `HAVE_` macro is used in the code and this function defines this macro but Autotools doesn't. The new `CHECK_HEADER()` function behaves similar except it doesn't define the `HAVE_<HEADER_NAME_H>` preprocessor macro. This removes the following unused compile definitions: HAVE_ARGON2_H HAVE_AVIF_H HAVE_BZLIB_H HAVE_CAPSTONE_CAPSTONE_H HAVE_CURL_EASY_H HAVE_DB_H HAVE_DECODE_H HAVE_DEPOT_H HAVE_EDITLINE_READLINE_H HAVE_ENCHANT_H HAVE_ENCODE_H HAVE_FFI_H HAVE_FIREBIRD_INTERFACE_H HAVE_FT2BUILD_H HAVE_GD_H HAVE_GLIB_H HAVE_GMP_H HAVE_HTTPD_H HAVE_IBASE_H HAVE_IR_IR_H HAVE_KECCAKHASH_H HAVE_LBER_H HAVE_LDAP_H HAVE_LIBEXSLT_EXSLT_H HAVE_LIBINTL_H HAVE_LIBPQ_FE_H HAVE_LIBTIDY_TIDY_H HAVE_LIBXML_PARSER_H HAVE_LIBXML_TREE_H HAVE_LIBXML_XMLWRITER_H HAVE_LIBXSLT_XSLT_H HAVE_LMDB_H HAVE_MBSTRING_H HAVE_MYSQL_H HAVE_ONIGURUMA_H HAVE_OPENSSL_SSL_H HAVE_PNG_H HAVE_SNMP_H HAVE_SODIUM_H HAVE_SQLITE3_H HAVE_SQLITE3EXT_H HAVE_SYBFRONT_H HAVE_TIDY_H HAVE_TIDY_TIDY_H HAVE_TIDYBUFFIO_H HAVE_TIMELIB_CONFIG_H HAVE_UNICODE_USPOOF_H HAVE_UNICODE_UTF_H HAVE_XPM_H HAVE_ZIP_H HAVE_ZIPCONF_H HAVE_ZLIB_H The following compile definitions are defined explicitly: - HAVE_ICONV_H - HAVE_MSCOREE_H - HAVE_SQL_H - HAVE_SQLEXT_H Additionally, the `SETUP_OPENSSL()` function doesn't accept the 6th argument anymore.
74 lines
2.5 KiB
Plaintext
74 lines
2.5 KiB
Plaintext
ARG_ENABLE("opcache-jit", "whether to enable JIT (not supported for ARM64)", "yes");
|
|
|
|
PHP_OPCACHE="yes";
|
|
|
|
ZEND_EXTENSION('opcache', "\
|
|
ZendAccelerator.c \
|
|
zend_accelerator_api.c \
|
|
zend_accelerator_blacklist.c \
|
|
zend_accelerator_debug.c \
|
|
zend_accelerator_hash.c \
|
|
zend_accelerator_module.c \
|
|
zend_accelerator_util_funcs.c \
|
|
zend_persist.c \
|
|
zend_persist_calc.c \
|
|
zend_file_cache.c \
|
|
zend_shared_alloc.c \
|
|
shared_alloc_win32.c", false, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
|
|
|
ADD_EXTENSION_DEP('opcache', 'date');
|
|
ADD_EXTENSION_DEP('opcache', 'hash');
|
|
ADD_EXTENSION_DEP('opcache', 'pcre');
|
|
|
|
if (PHP_OPCACHE_JIT == "yes") {
|
|
if (TARGET_ARCH == 'arm64') {
|
|
WARNING("JIT not enabled; not yet supported for ARM64");
|
|
} else if (CHECK_HEADER("ir/ir.h", "CFLAGS_OPCACHE", PHP_OPCACHE + ";ext\\opcache\\jit")) {
|
|
var dasm_flags = (X64 ? "-D X64=1" : "") + (X64 ? " -D X64WIN=1" : "") + " -D WIN=1";
|
|
var ir_target = (X64 ? "IR_TARGET_X64" : "IR_TARGET_X86");
|
|
var ir_src = "ir_strtab.c ir_cfg.c ir_sccp.c ir_gcm.c ir_ra.c ir_save.c \
|
|
ir_dump.c ir_check.c ir_patch.c";
|
|
|
|
DEFINE("IR_TARGET", ir_target);
|
|
DEFINE("DASM_FLAGS", dasm_flags);
|
|
DEFINE("DASM_ARCH", "x86");
|
|
DEFINE("TLS_TARGET", "win");
|
|
|
|
AC_DEFINE('HAVE_JIT', 1, 'Define to 1 to enable JIT.');
|
|
|
|
ADD_FLAG("CFLAGS_OPCACHE", "/I \"ext\\opcache\\jit\\ir\" /D "+ir_target+" /D IR_PHP");
|
|
if (PHP_DEBUG == "yes") {
|
|
ADD_FLAG("CFLAGS_OPCACHE", "/D IR_DEBUG");
|
|
}
|
|
|
|
if (CHECK_HEADER("capstone\\capstone.h", "CFLAGS_OPCACHE", PHP_OPCACHE+ ";" + PHP_PHP_BUILD + "\\include") &&
|
|
CHECK_LIB("capstone.lib", "opcache", PHP_OPCACHE)) {
|
|
AC_DEFINE('HAVE_CAPSTONE', 1, 'Define to 1 if Capstone is available.');
|
|
ir_src += " ir_disasm.c";
|
|
}
|
|
|
|
ADD_MAKEFILE_FRAGMENT(configure_module_dirname + "\\jit\\Makefile.frag.w32");
|
|
|
|
ADD_SOURCES(configure_module_dirname + "\\jit",
|
|
"zend_jit.c zend_jit_vm_helpers.c",
|
|
"opcache", "ext\\opcache\\jit");
|
|
if (PHP_ZTS == "yes") {
|
|
ADD_SOURCES(configure_module_dirname + "\\jit\\tls",
|
|
"zend_jit_tls_win.c",
|
|
"opcache", "ext\\opcache\\jit\\tls");
|
|
}
|
|
ADD_SOURCES(configure_module_dirname + "\\jit\\ir",
|
|
"ir.c", "opcache", "ext\\opcache\\jit\\ir");
|
|
ADD_SOURCES(configure_module_dirname + "\\jit\\ir",
|
|
"ir_emit.c", "opcache", "ext\\opcache\\jit\\ir");
|
|
ADD_SOURCES(configure_module_dirname + "\\jit\\ir",
|
|
ir_src, "opcache", "ext\\opcache\\jit\\ir");
|
|
} else {
|
|
WARNING("JIT not enabled, headers not found");
|
|
}
|
|
}
|
|
|
|
ADD_FLAG('CFLAGS_OPCACHE', "/I " + configure_module_dirname);
|
|
|
|
PHP_INSTALL_HEADERS("ext/opcache", "zend_accelerator_api.h");
|