com php-src: Fixed bug #65715 php5embed.lib isn't provided anymore: sapi/embed/config.w32 win32/build/confutils.js
| From: | Anatol Belski | Date: | Mon, 24 Mar 2014 09:24:37 +0000 |
| Subject: | com php-src: Fixed bug #65715 php5embed.lib isn't provided anymore: sapi/embed/config.w32 win32/build/confutils.js | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-76578@lists.php.net to get a copy of this message | ||
Commit: 17a57ad980f9585fd614101af590c8086a2b7c17
Author: Anatol Belski <ab@php.net> Mon, 24 Mar 2014 10:24:37 +0100
Parents: 9b88bc494e5e749039bd0166723b6b0a35de5a3e
Branches: PHP-5.4 PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=17a57ad980f9585fd614101af590c8086a2b7c17
Log:
Fixed bug #65715 php5embed.lib isn't provided anymore
Bugs:
https://bugs.php.net/65715
Changed paths:
M sapi/embed/config.w32
M win32/build/confutils.js
Diff:
diff --git a/sapi/embed/config.w32 b/sapi/embed/config.w32
index f3cc60d..64e44bd 100644
--- a/sapi/embed/config.w32
+++ b/sapi/embed/config.w32
@@ -3,6 +3,8 @@
ARG_ENABLE('embed', 'Embedded SAPI library', 'no');
+var PHP_EMBED_PGO = false;
+
if (PHP_EMBED != "no") {
SAPI('embed', 'php_embed.c', 'php' + PHP_VERSION +
'embed.lib');
PHP_INSTALL_HEADERS("sapi/embed", "php_embed.h");
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index e0df4f6..489aa09 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -1015,6 +1015,21 @@ function generate_version_info_resource(makefiletarget, basename,
creditspath, s
return resname;
}
+/* Check if PGO is enabled for given module. To disable PGO for a particular module,
+define a global variable by the following name scheme before SAPI() or EXTENSION() call
+ var PHP_MYMODULE_PGO = false; */
+function is_pgo_desired(mod)
+{
+ var varname = "PHP_" + mod.toUpperCase() + "_PGO";
+
+ /* don't disable if there's no mention of the varname */
+ if (eval("typeof " + varname + " == 'undefined'")) {
+ return true;
+ }
+
+ return eval("!!" + varname);
+}
+
function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir)
{
var SAPI = sapiname.toUpperCase();
@@ -1066,7 +1081,7 @@ function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir)
manifest = "-@$(_VC_MANIFEST_EMBED_EXE)";
}
- if(PHP_PGI == "yes" || PHP_PGO != "no") {
+ if(is_pgo_desired(sapiname) && (PHP_PGI == "yes" || PHP_PGO != "no"))
{
ldflags += " /PGD:$(PGOPGD_DIR)\\" + makefiletarget.substring(0,
makefiletarget.indexOf(".")) + ".pgd";
}
@@ -1252,7 +1267,7 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
var ld = "@$(CC)";
ldflags = "";
- if (PHP_PGI == "yes" || PHP_PGO != "no") {
+ if (is_pgo_desired(extname) && (PHP_PGI == "yes" || PHP_PGO != "no"))
{
ldflags = " /PGD:$(PGOPGD_DIR)\\" + dllname.substring(0,
dllname.indexOf(".")) + ".pgd";
}