diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2017-12-04 17:39:08 +0100 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2017-12-04 17:39:08 +0100 |
commit | 525ab4198ee2b25fe309cf5dc2180f64ea14ae57 (patch) | |
tree | 92dfe55b780b22d16d701c3399f3bbd5f31dae46 /win32/build/confutils.js | |
parent | 23cfe1f06ffcedc6ba1e3c999605c5daf7a2d35a (diff) | |
download | php-git-525ab4198ee2b25fe309cf5dc2180f64ea14ae57.tar.gz |
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(...);
}
Diffstat (limited to 'win32/build/confutils.js')
-rw-r--r-- | win32/build/confutils.js | 52 |
1 files changed, 45 insertions, 7 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 7fb28d058c..d49f530bd8 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() |