File: config.w32

package info (click to toggle)
php8.4 8.4.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 211,276 kB
  • sloc: ansic: 1,176,142; php: 35,419; sh: 11,964; cpp: 7,208; pascal: 4,951; javascript: 3,091; asm: 2,817; yacc: 2,411; makefile: 696; xml: 446; python: 301; awk: 148
file content (70 lines) | stat: -rw-r--r-- 2,466 bytes parent folder | download | duplicates (2)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
ARG_ENABLE("opcache", "whether to enable Zend OPcache support", "yes");


if (PHP_OPCACHE != "no") {

	ARG_ENABLE("opcache-jit", "whether to enable JIT (not supported for ARM64)", "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");

	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_ADD_INCLUDE("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");

			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_ADD_INCLUDE("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");
			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);

}