Skip to content

Commit 4edce91

Browse files
committed
Avoid unnecessary linking of Windows DLLs
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.
1 parent 066a378 commit 4edce91

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/opcache/config.w32

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ if (PHP_OPCACHE != "no") {
3232

3333
ADD_MAKEFILE_FRAGMENT(configure_module_dirname + "\\jit\\Makefile.frag.w32");
3434

35-
ADD_SOURCES(configure_module_dirname + "\\jit", "zend_jit.c zend_jit_vm_helpers.c", "opcache", "opcache_jit");
35+
ADD_SOURCES(configure_module_dirname + "\\jit", "zend_jit.c zend_jit_vm_helpers.c", "opcache", "ext\\opcache\\jit");
3636
} else {
3737
WARNING("JIT not enabled, headers not found");
3838
}
3939
}
4040

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", "OptimizerObj");
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");
4242

4343
ADD_FLAG('CFLAGS_OPCACHE', "/I " + configure_module_dirname);
4444

ext/opcache/jit/Makefile.frag.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ext\opcache\jit\zend_jit_x86.c: ext\opcache\jit\zend_jit_x86.dasc $(BUILD_DIR)\\
66
@if exist ext\opcache\jit\zend_jit_x86.c del ext\opcache\jit\zend_jit_x86.c
77
$(BUILD_DIR)\\minilua.exe ext/opcache/jit/dynasm/dynasm.lua $(DASM_FLAGS) -o $@ ext/opcache/jit/zend_jit_x86.dasc
88

9-
$(BUILD_DIR)\opcache_jit\zend_jit.obj: \
9+
$(BUILD_DIR)\ext\opcache\jit\zend_jit.obj: \
1010
ext/opcache/jit/zend_jit_x86.c \
1111
ext/opcache/jit/zend_jit_helpers.c \
1212
ext/opcache/jit/zend_jit_disasm_x86.c \

0 commit comments

Comments
 (0)