diff options
author | Anatol Belski <ab@php.net> | 2014-03-24 19:15:02 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-03-24 19:15:02 +0100 |
commit | 6612e1ba6a3c40d0de3ee65fae75ab69e6bf853b (patch) | |
tree | 6c2063fa544ecb6d76499994565953bdf4af0963 | |
parent | 5efda763be97e36fd5c033a42c643357ed83782f (diff) | |
download | php-git-6612e1ba6a3c40d0de3ee65fae75ab69e6bf853b.tar.gz |
more fixes related to bug #65715
-rw-r--r-- | win32/build/config.w32 | 8 | ||||
-rw-r--r-- | win32/build/confutils.js | 20 |
2 files changed, 24 insertions, 4 deletions
diff --git a/win32/build/config.w32 b/win32/build/config.w32 index f025ae2f39..ac74085620 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 489aa09bd5..490f864573 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";
}
|