xref: /PHP-8.1/ext/opcache/config.w32 (revision 0de94944)
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			DEFINE("DASM_ARCH", "x86");
29
30			AC_DEFINE('HAVE_JIT', 1, 'Define to enable JIT');
31			/* XXX read this dynamically */
32			/*ADD_FLAG("CFLAGS_OPCACHE", "/D DASM_VERSION=10400");*/
33
34			ADD_MAKEFILE_FRAGMENT(configure_module_dirname + "\\jit\\Makefile.frag.w32");
35
36			ADD_SOURCES(configure_module_dirname + "\\jit", "zend_jit.c zend_jit_vm_helpers.c", "opcache", "ext\\opcache\\jit");
37		} else {
38			WARNING("JIT not enabled, headers not found");
39		}
40	}
41
42	ADD_FLAG('CFLAGS_OPCACHE', "/I " + configure_module_dirname);
43
44}
45
46