From bc23ec81093c57add924ae9936d6adfc192d5f2e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 12 Oct 2024 12:58:04 +0200 Subject: [PATCH] Move ARG_ENABLE() "macros" out of confutils.js While these "macros" work perfectly fine in confutils, it is somewhat strange to have these two there, while all others are in config.w32 files. In particular, there is no need for a `MODE_PHPIZE` guard, since there are already config.w32 and config.w32.phpize.in. However, we need to replace the semicolon the helptext, because the regex which parses ARG_(ENABLE|WITH) calls is restricted, and does not accept semicolons. --- win32/build/config.w32 | 4 ++++ win32/build/config.w32.phpize.in | 2 ++ win32/build/confutils.js | 9 --------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 043f18b275b9d..696a8ed5c9efe 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -396,3 +396,7 @@ ARG_ENABLE("native-intrinsics", "Comma separated list of intrinsic optimizations might not work properly, if the chosen instruction sets are not available on the target \ processor.", "no"); toolset_setup_intrinsic_cflags(); + +ARG_ENABLE('snapshot-build', 'Build a snapshot: turns on everything it can and ignores build errors', 'no'); + +ARG_ENABLE('vs-link-compat', 'Allow linking of libraries built with compatible versions of VS toolset', 'yes'); diff --git a/win32/build/config.w32.phpize.in b/win32/build/config.w32.phpize.in index bb466cd7f58d3..82b97e1145e97 100644 --- a/win32/build/config.w32.phpize.in +++ b/win32/build/config.w32.phpize.in @@ -143,3 +143,5 @@ ARG_ENABLE("native-intrinsics", "Comma separated list of intrinsic optimizations might not work properly, if the optimizations are not available on the target \ processor.", "no"); toolset_setup_intrinsic_cflags(); + +ARG_ENABLE('vs-link-compat', 'Allow linking of libraries built with compatible versions of VS toolset', 'yes'); diff --git a/win32/build/confutils.js b/win32/build/confutils.js index c3b5ef9b29e40..df486a1914dda 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -2898,9 +2898,6 @@ function PHP_INSTALL_HEADERS(dir, headers_list) // and you can then build everything, ignoring fatal errors within a module // by running "nmake snap" PHP_SNAPSHOT_BUILD = "no"; -if (!MODE_PHPIZE) { - ARG_ENABLE('snapshot-build', 'Build a snapshot; turns on everything it can and ignores build errors', 'no'); -} function toolset_option_handle() { @@ -3766,9 +3763,3 @@ function setup_verbosity() CMD_MOD2 = "@"; } } - -try { - ARG_ENABLE('vs-link-compat', 'Allow linking of libraries built with compatible versions of VS toolset', 'yes'); -} catch (e) { - STDOUT.WriteLine("problem: " + e); -}