summaryrefslogtreecommitdiff
path: root/ext/opcache/config.w32
blob: a7f292ee7625f4d621aee39256799428a3c70c0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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_FLAG('CFLAGS_OPCACHE', "/I " + configure_module_dirname);

}