mirror of
https://github.com/php/php-src.git
synced 2024-12-22 08:20:23 +08:00
more fixes related to bug #65715
This commit is contained in:
parent
5efda763be
commit
6612e1ba6a
@ -250,13 +250,13 @@ 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('CFLAGS', "/GL /O2");
|
||||
ADD_FLAG('LDFLAGS', "/LTCG:PGINSTRUMENT");
|
||||
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('CFLAGS', "/GL /O2");
|
||||
ADD_FLAG('LDFLAGS', "/LTCG:PGUPDATE");
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -1082,6 +1082,16 @@ function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir)
|
||||
}
|
||||
|
||||
if(is_pgo_desired(sapiname) && (PHP_PGI == "yes" || PHP_PGO != "no")) {
|
||||
// Add compiler and link flags if PGO options are selected
|
||||
if (PHP_DEBUG != "yes" && PHP_PGI == "yes") {
|
||||
ADD_FLAG('CFLAGS_' + SAPI, "/GL /O2");
|
||||
ADD_FLAG('LDFLAGS_' + SAPI, "/LTCG:PGINSTRUMENT");
|
||||
}
|
||||
else if (PHP_DEBUG != "yes" && PHP_PGO != "no") {
|
||||
ADD_FLAG('CFLAGS_' + SAPI, "/GL /O2");
|
||||
ADD_FLAG('LDFLAGS_' + SAPI, "/LTCG:PGUPDATE");
|
||||
}
|
||||
|
||||
ldflags += " /PGD:$(PGOPGD_DIR)\\" + makefiletarget.substring(0, makefiletarget.indexOf(".")) + ".pgd";
|
||||
}
|
||||
|
||||
@ -1268,6 +1278,16 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
|
||||
|
||||
ldflags = "";
|
||||
if (is_pgo_desired(extname) && (PHP_PGI == "yes" || PHP_PGO != "no")) {
|
||||
// Add compiler and link flags if PGO options are selected
|
||||
if (PHP_DEBUG != "yes" && PHP_PGI == "yes") {
|
||||
ADD_FLAG('LDFLAGS_' + EXT, "/LTCG:PGINSTRUMENT");
|
||||
}
|
||||
else if (PHP_DEBUG != "yes" && PHP_PGO != "no") {
|
||||
ADD_FLAG('LDFLAGS_' + EXT, "/LTCG:PGUPDATE");
|
||||
}
|
||||
|
||||
ADD_FLAG('CFLAGS_' + EXT, "/GL /O2");
|
||||
|
||||
ldflags = " /PGD:$(PGOPGD_DIR)\\" + dllname.substring(0, dllname.indexOf(".")) + ".pgd";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user