Skip to content

Commit fe76b39

Browse files
authored
Move ARG_(WITH|ENABLE) to the toplevel (phpGH-16391)
`buildconf` (and `phpize`) have special treatment for these "macros". When configure.js is built, all config.w32 are grepped, these "macros" are appended to configure.js, and all config.w32 contents are appended with the "macros" commented out. That means that for `configure` they are in the toplevel anyway, so having them inside of `if` statements in config.w32 is confusing. Note that this matches autoconf behavior.
1 parent 41c55d1 commit fe76b39

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ext/opcache/config.w32

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
ARG_ENABLE("opcache", "whether to enable Zend OPcache support", "yes");
2+
ARG_ENABLE("opcache-jit", "whether to enable JIT", "yes");
23

34

45
if (PHP_OPCACHE != "no") {
56

6-
ARG_ENABLE("opcache-jit", "whether to enable JIT", "yes");
7-
87
ZEND_EXTENSION('opcache', "\
98
ZendAccelerator.c \
109
zend_accelerator_blacklist.c \

win32/build/config.w32

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,15 +355,15 @@ if (PHP_SECURITY_FLAGS == "yes") {
355355
ADD_FLAG("LDFLAGS", "/NXCOMPAT /DYNAMICBASE ");
356356
}
357357

358+
ARG_WITH("uncritical-warn-choke", "Disable some uncritical warnings", "yes");
359+
ARG_ENABLE("sanitizer", "Enable ASan and UBSan extensions", "no");
358360
if (CLANG_TOOLSET) {
359-
ARG_WITH("uncritical-warn-choke", "Disable some uncritical warnings", "yes");
360361
if (PHP_UNCRITICAL_WARN_CHOKE != "no") {
361362
ADD_FLAG("CFLAGS", "-Wno-ignored-attributes -Wno-deprecated-declarations -Wno-missing-braces " +
362363
"-Wno-logical-op-parentheses -Wno-msvc-include -Wno-invalid-source-encoding -Wno-unknown-pragmas " +
363364
"-Wno-unused-command-line-argument -Wno-unused-function -Wno-ignored-pragma-optimize");
364365
}
365366

366-
ARG_ENABLE("sanitizer", "Enable ASan and UBSan extensions", "no");
367367
if (PHP_SANITIZER == "yes") {
368368
if (COMPILER_NUMERIC_VERSION < 500) {
369369
ERROR("Clang at least 5.0.0 required for sanitation plugins");

0 commit comments

Comments
 (0)