com php-src: Introduce ZEND_EXTENSION() to the Wind ows build system: ext/opcache/config.w32 win3 2/build/confutils.js
| From: | Kalle Sommer Nielsen | Date: | Mon, 04 Dec 2017 16:39:08 +0000 |
| Subject: | com php-src: Introduce ZEND_EXTENSION() to the Wind ows build system: ext/opcache/config.w32 win3 2/build/confutils.js | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100484@lists.php.net to get a copy of this message | ||
Commit: 525ab4198ee2b25fe309cf5dc2180f64ea14ae57
Author: Kalle Sommer Nielsen <kalle@php.net> Mon, 4 Dec 2017 17:39:08 +0100
Parents: 23cfe1f06ffcedc6ba1e3c999605c5daf7a2d35a
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=525ab4198ee2b25fe309cf5dc2180f64ea14ae57
Log:
Introduce ZEND_EXTENSION() to the Windows build system
Zend Extensions should now be declared in their config.w32 with a ZEND_EXTENSION() call instead of
EXTENSION(), the parameters sent is identical.
For a cross version compatible config.w32, the following will do:
if (typeof(ZEND_EXTENSION) == 'undefined') {
EXTENSION(...);
} else {
ZEND_EXTENSION(...);
}
Changed paths:
M ext/opcache/config.w32
M win32/build/confutils.js
Diff:
diff --git a/ext/opcache/config.w32 b/ext/opcache/config.w32
index 8a33fd9..a545694 100644
--- a/ext/opcache/config.w32
+++ b/ext/opcache/config.w32
@@ -10,7 +10,7 @@ if (PHP_OPCACHE != "no") {
AC_DEFINE('HAVE_OPCACHE_FILE_CACHE', 1, 'Define to enable file based caching
(experimental)');
}
- EXTENSION('opcache', "\
+ ZEND_EXTENSION('opcache', "\
ZendAccelerator.c \
zend_accelerator_blacklist.c \
zend_accelerator_debug.c \
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 7fb28d0..d49f530 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -1373,6 +1373,13 @@ function ADD_EXTENSION_DEP(extname, dependson, optional)
var static_pgo_enabled = false;
+function ZEND_EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
+{
+ EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir);
+
+ extensions_enabled[extensions_enabled.length - 1][2] = true;
+}
+
function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
{
var objs = null;
@@ -1509,7 +1516,8 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
}
ADD_FLAG("CFLAGS_" + EXT, cflags);
- extensions_enabled[extensions_enabled.length] = [extname, shared ? 'shared' :
'static'];
+ // [extname, shared, zend]
+ extensions_enabled[extensions_enabled.length] = [extname, shared ? 'shared' :
'static', false];
}
function ADD_SOURCES(dir, file_list, target, obj_dir)
@@ -1870,14 +1878,42 @@ function output_as_table(header, ar_out)
STDOUT.WriteLine(sep);
}
+function write_extensions_summary()
+{
+ var exts = new Array();
+ var zend_exts = new Array();
+
+ for(var x = 0; x < extensions_enabled.length; ++x)
+ {
+ var l = extensions_enabled[x];
+
+ if(l[2])
+ {
+ zend_exts.push([l[0], l[1]]);
+ }
+ else
+ {
+ exts.push([l[0], l[1]]);
+ }
+ }
+
+ STDOUT.WriteLine('Enabled extensions:');
+ output_as_table(['Extension', 'Mode'], exts.sort());
+
+ if(zend_exts.length)
+ {
+ STDOUT.WriteBlankLines(2);
+ STDOUT.WriteLine('Enabled Zend extensions:');
+ output_as_table(['Extension', 'Mode'], zend_exts.sort());
+ }
+}
+
function write_summary()
{
var ar = new Array();
STDOUT.WriteBlankLines(2);
-
- STDOUT.WriteLine("Enabled extensions:");
- output_as_table(["Extension", "Mode"], extensions_enabled.sort());
+ write_extensions_summary();
STDOUT.WriteBlankLines(2);
if (!MODE_PHPIZE) {
STDOUT.WriteLine("Enabled SAPI:");
@@ -1947,8 +1983,10 @@ function generate_tmp_php_ini()
continue;
}
- var directive = "extension";
- if ("opcache" == extensions_enabled[i][0] || "xdebug" ==
extensions_enabled[i][0]) {
+ var directive = (extensions_enabled[i][2] ? 'zend_extension' : 'extension');
+
+ // FIXME: Remove this once ZEND_EXTENSION() is merged to XDEBUG
+ if ("xdebug" == extensions_enabled[i][0]) {
directive = "zend_extension";
}
@@ -1962,7 +2000,7 @@ function generate_tmp_php_ini()
}
}
- INI.Close();;
+ INI.Close();
}
function generate_files()