xref: /PHP-8.0/ext/opcache/config.w32 (revision 4edce91f)
1ARG_ENABLE("opcache", "whether to enable Zend OPcache support", "yes");
2
3
4if (PHP_OPCACHE != "no") {
5
6	ARG_ENABLE("opcache-jit", "whether to enable JIT", "yes");
7
8	ZEND_EXTENSION('opcache', "\
9		ZendAccelerator.c \
10		zend_accelerator_blacklist.c \
11		zend_accelerator_debug.c \
12		zend_accelerator_hash.c \
13		zend_accelerator_module.c \
14		zend_accelerator_util_funcs.c \
15		zend_persist.c \
16		zend_persist_calc.c \
17		zend_file_cache.c \
18		zend_shared_alloc.c \
19		shared_alloc_win32.c", true, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
20
21	if (PHP_OPCACHE_JIT == "yes") {
22		if (CHECK_HEADER_ADD_INCLUDE("dynasm/dasm_x86.h", "CFLAGS_OPCACHE", PHP_OPCACHE + ";ext\\opcache\\jit")) {
23			var dasm_flags = (X64 ? "-D X64=1" : "") + (X64 ? " -D X64WIN=1" : "") + " -D WIN=1";
24			if (PHP_ZTS == "yes") {
25				dasm_flags += " -D ZTS=1";
26			}
27			DEFINE("DASM_FLAGS", dasm_flags);
28
29			AC_DEFINE('HAVE_JIT', 1, 'Define to enable JIT');
30			/* XXX read this dynamically */
31			/*ADD_FLAG("CFLAGS_OPCACHE", "/D DASM_VERSION=10400");*/
32
33			ADD_MAKEFILE_FRAGMENT(configure_module_dirname + "\\jit\\Makefile.frag.w32");
34
35			ADD_SOURCES(configure_module_dirname + "\\jit", "zend_jit.c zend_jit_vm_helpers.c", "opcache", "ext\\opcache\\jit");
36		} else {
37			WARNING("JIT not enabled, headers not found");
38		}
39	}
40
41	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");
42
43	ADD_FLAG('CFLAGS_OPCACHE', "/I " + configure_module_dirname);
44
45}
46
47