mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
4edce91fae
For snapshot builds (`--enable-snapshot-build`), after the build has been completely finished, running `nmake` causes a lot of DLLs to be rebuilt. The problem is that the build folders OptimizerObj and opcache_jit are dependencies of the main PHP DLL, but these folders do not exists in the source tree, so nmake assumes it has to re-link the main PHP DLL, and that makes several other DLLs stale. We solve that by mirroring the folder structure of the respective source folders.
47 lines
1.7 KiB
Plaintext
47 lines
1.7 KiB
Plaintext
ARG_ENABLE("opcache", "whether to enable Zend OPcache support", "yes");
|
|
|
|
|
|
if (PHP_OPCACHE != "no") {
|
|
|
|
ARG_ENABLE("opcache-jit", "whether to enable JIT", "yes");
|
|
|
|
ZEND_EXTENSION('opcache', "\
|
|
ZendAccelerator.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", true, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
|
|
|
if (PHP_OPCACHE_JIT == "yes") {
|
|
if (CHECK_HEADER_ADD_INCLUDE("dynasm/dasm_x86.h", "CFLAGS_OPCACHE", PHP_OPCACHE + ";ext\\opcache\\jit")) {
|
|
var dasm_flags = (X64 ? "-D X64=1" : "") + (X64 ? " -D X64WIN=1" : "") + " -D WIN=1";
|
|
if (PHP_ZTS == "yes") {
|
|
dasm_flags += " -D ZTS=1";
|
|
}
|
|
DEFINE("DASM_FLAGS", dasm_flags);
|
|
|
|
AC_DEFINE('HAVE_JIT', 1, 'Define to enable JIT');
|
|
/* XXX read this dynamically */
|
|
/*ADD_FLAG("CFLAGS_OPCACHE", "/D DASM_VERSION=10400");*/
|
|
|
|
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");
|
|
} else {
|
|
WARNING("JIT not enabled, headers not found");
|
|
}
|
|
}
|
|
|
|
ADD_SOURCES(configure_module_dirname + "/Optimizer", "zend_optimizer.c pass1.c pass3.c optimize_func_calls.c block_pass.c optimize_temp_vars_5.c nop_removal.c compact_literals.c zend_cfg.c zend_dfg.c dfa_pass.c zend_ssa.c zend_inference.c zend_func_info.c zend_call_graph.c zend_dump.c escape_analysis.c compact_vars.c dce.c sccp.c scdf.c", "opcache", "ext\\opcache\\Optimizer");
|
|
|
|
ADD_FLAG('CFLAGS_OPCACHE', "/I " + configure_module_dirname);
|
|
|
|
}
|
|
|