mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: fix disabling PGO for extensions, rel bug #65715
This commit is contained in:
commit
655f2973eb
3 changed files with 17 additions and 5 deletions
|
@ -1,9 +1,8 @@
|
|||
ARG_ENABLE("opcache", "whether to enable Zend OPcache support", "yes");
|
||||
|
||||
if (PHP_OPCACHE != "no") {
|
||||
var PHP_OPCACHE_PGO = false;
|
||||
|
||||
PHP_PGI = "no"; // workaround
|
||||
PHP_PGO = "no"; // workaround
|
||||
if (PHP_OPCACHE != "no") {
|
||||
|
||||
EXTENSION('opcache', "\
|
||||
ZendAccelerator.c \
|
||||
|
|
|
@ -255,12 +255,10 @@ if (PHP_DEBUG == "yes" && PHP_ZTS == "yes") {
|
|||
// CFLAGS, LDFLAGS and BUILD_DIR are defined
|
||||
// Add compiler and link flags if PGO options are selected
|
||||
if (PHP_DEBUG != "yes" && PHP_PGI == "yes") {
|
||||
ADD_FLAG('DLL_LDFLAGS', "/LTCG:PGINSTRUMENT");
|
||||
ADD_FLAG("STATIC_EXT_CFLAGS", "/GL /O2");
|
||||
DEFINE("PGOPGD_DIR", "$(BUILD_DIR)");
|
||||
}
|
||||
else if (PHP_DEBUG != "yes" && PHP_PGO != "no") {
|
||||
ADD_FLAG('DLL_LDFLAGS', "/LTCG:PGUPDATE");
|
||||
ADD_FLAG("STATIC_EXT_CFLAGS", "/GL /O2");
|
||||
DEFINE("PGOPGD_DIR", ((PHP_PGO.length == 0 || PHP_PGO == "yes") ? "$(BUILD_DIR)" : PHP_PGO));
|
||||
}
|
||||
|
|
|
@ -1230,6 +1230,8 @@ function ADD_EXTENSION_DEP(extname, dependson, optional)
|
|||
return true;
|
||||
}
|
||||
|
||||
var static_pgo_enabled = false;
|
||||
|
||||
function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
|
||||
{
|
||||
var objs = null;
|
||||
|
@ -1320,6 +1322,19 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
|
|||
ADD_FLAG("STATIC_EXT_LIBS", "$(LIBS_" + EXT + ")");
|
||||
ADD_FLAG("STATIC_EXT_LDFLAGS", "$(LDFLAGS_" + EXT + ")");
|
||||
ADD_FLAG("STATIC_EXT_CFLAGS", "$(CFLAGS_" + EXT + ")");
|
||||
if (is_pgo_desired(extname) && (PHP_PGI == "yes" || PHP_PGO != "no")) {
|
||||
if (!static_pgo_enabled) {
|
||||
if (PHP_DEBUG != "yes" && PHP_PGI == "yes") {
|
||||
ADD_FLAG('STATIC_EXT_LDFLAGS', "/LTCG:PGINSTRUMENT");
|
||||
}
|
||||
else if (PHP_DEBUG != "yes" && PHP_PGO != "no") {
|
||||
ADD_FLAG('STATIC_EXT_LDFLAGS', "/LTCG:PGUPDATE");
|
||||
}
|
||||
|
||||
ADD_FLAG("STATIC_EXT_CFLAGS", "/GL /O2");
|
||||
static_pgo_enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* find the header that declares the module pointer,
|
||||
* so we can include it in internal_functions.c */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue