From 4edce91fae736cf9ddbd2e7220843995644ffafe Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 27 May 2020 16:59:54 +0200 Subject: [PATCH] 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. --- ext/opcache/config.w32 | 4 ++-- ext/opcache/jit/Makefile.frag.w32 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/opcache/config.w32 b/ext/opcache/config.w32 index 7c67ccf0f6..fb921c73da 100644 --- a/ext/opcache/config.w32 +++ b/ext/opcache/config.w32 @@ -32,13 +32,13 @@ if (PHP_OPCACHE != "no") { 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", "opcache_jit"); + 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_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"); + 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"); ADD_FLAG('CFLAGS_OPCACHE', "/I " + configure_module_dirname); diff --git a/ext/opcache/jit/Makefile.frag.w32 b/ext/opcache/jit/Makefile.frag.w32 index 306c89f029..d864ec619c 100644 --- a/ext/opcache/jit/Makefile.frag.w32 +++ b/ext/opcache/jit/Makefile.frag.w32 @@ -6,7 +6,7 @@ ext\opcache\jit\zend_jit_x86.c: ext\opcache\jit\zend_jit_x86.dasc $(BUILD_DIR)\\ @if exist ext\opcache\jit\zend_jit_x86.c del ext\opcache\jit\zend_jit_x86.c $(BUILD_DIR)\\minilua.exe ext/opcache/jit/dynasm/dynasm.lua $(DASM_FLAGS) -o $@ ext/opcache/jit/zend_jit_x86.dasc -$(BUILD_DIR)\opcache_jit\zend_jit.obj: \ +$(BUILD_DIR)\ext\opcache\jit\zend_jit.obj: \ ext/opcache/jit/zend_jit_x86.c \ ext/opcache/jit/zend_jit_helpers.c \ ext/opcache/jit/zend_jit_disasm_x86.c \ -- 2.50.1