com php-src: more fixes related to bug #65715: win32/build/config.w32 win32/build/confutils.js
| From: | Anatol Belski | Date: | Mon, 24 Mar 2014 18:15:02 +0000 |
| Subject: | com php-src: more fixes related to bug #65715: win32/build/config.w32 win32/build/confutils.js | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-76586@lists.php.net to get a copy of this message | ||
Commit: 6612e1ba6a3c40d0de3ee65fae75ab69e6bf853b
Author: Anatol Belski <ab@php.net> Mon, 24 Mar 2014 19:15:02 +0100
Parents: 5efda763be97e36fd5c033a42c643357ed83782f
Branches: PHP-5.4 PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6612e1ba6a3c40d0de3ee65fae75ab69e6bf853b
Log:
more fixes related to bug #65715
Bugs:
https://bugs.php.net/65715
Changed paths:
M win32/build/config.w32
M win32/build/confutils.js
Diff:
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index f025ae2..ac74085 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -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));
}
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 489aa09..490f864 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -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";
}