com php-src: further catch up with phpize and improved clang arch setup: win32/build/config.w32 win32/build/config.w32.phpize.in
win32/build/confutils.js
| From: | Anatol Belski | Date: | Fri, 07 Nov 2014 17:33:37 +0000 |
| Subject: | com php-src: further catch up with phpize and improved clang arch setup: win32/build/config.w32 win32/build/config.w32.phpize.in win32/build/confutils.js |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82986@lists.php.net to get a copy of this message | ||
Commit: fc734cf95da914aa0f6eac0b8ceeb1c1d9fcdf69
Author: Anatol Belski <ab@php.net> Fri, 7 Nov 2014 18:33:37 +0100
Parents: cfd2b39c187fa82a79556a4f2fa4bebac77eb412
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fc734cf95da914aa0f6eac0b8ceeb1c1d9fcdf69
Log:
further catch up with phpize and improved clang arch setup
Changed paths:
M win32/build/config.w32
M win32/build/config.w32.phpize.in
M win32/build/confutils.js
Diff:
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index b3cad0b..81a7bd9 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -68,13 +68,6 @@ DEFINE('PHP_PREFIX', PHP_PREFIX);
DEFINE("BASE_INCLUDES", "/I . /I main /I Zend /I TSRM /I ext ");
-// CFLAGS for building the PHP dll
-DEFINE("CFLAGS_PHP", "/D _USRDLL /D PHP7DLLTS_EXPORTS /D PHP_EXPORTS \
-/D LIBZEND_EXPORTS /D TSRM_EXPORTS /D SAPI_EXPORTS /D WINVER=" + WINVER);
-
-DEFINE('CFLAGS_PHP_OBJ', '$(CFLAGS_PHP) $(STATIC_EXT_CFLAGS)');
-
-// General CFLAGS for building objects
toolset_setup_common_cflags();
ARG_WITH('mp', 'Tell Visual Studio use up to [n,auto,disable] processes for
compilation', 'auto');
diff --git a/win32/build/config.w32.phpize.in b/win32/build/config.w32.phpize.in
index b765b65..c3263ba 100644
--- a/win32/build/config.w32.phpize.in
+++ b/win32/build/config.w32.phpize.in
@@ -53,13 +53,6 @@ DEFINE('PHP_PREFIX', PHP_PREFIX);
DEFINE("BASE_INCLUDES", "/I " + PHP_DIR + "/include /I " + PHP_DIR +
"/include/main /I " + PHP_DIR + "/include/Zend /I " + PHP_DIR +
"/include/TSRM /I " + PHP_DIR + "/include/ext ");
-// CFLAGS for building the PHP dll
-DEFINE("CFLAGS_PHP", "/D _USRDLL /D PHP7DLLTS_EXPORTS /D PHP_EXPORTS \
-/D LIBZEND_EXPORTS /D TSRM_EXPORTS /D SAPI_EXPORTS /D WINVER=" + WINVER);
-
-DEFINE('CFLAGS_PHP_OBJ', '$(CFLAGS_PHP) $(STATIC_EXT_CFLAGS)');
-
-// General CFLAGS for building objects
toolset_setup_common_cflags();
ARG_WITH('prefix', 'PHP installation prefix', '');
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 35694cb..0892c00 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -2480,10 +2480,15 @@ function toolset_is_64()
if (VS_TOOLSET) {
return probe_binary(PHP_CL, 64);
} else if (CLANG_TOOLSET) {
- var command = 'cmd /c ""' + PHP_CL + '" -v"';
+ /*var command = 'cmd /c ""' + PHP_CL + '" -v"';
var full = execute(command + '" 2>&1"');
- return null != full.match(/x86_64/);
+ return null != full.match(/x86_64/);*/
+
+ /* Even executed within an environment setup with vcvars32.bat,
+ clang-cl doesn't recognize the arch toolset. But as it needs
+ the VS environment, checking the arch of cl.exe is correct. */
+ return probe_binary(PATH_PROG('cl', null), 64);
} else if (INTEL_TOOLSET) {
var command = 'cmd /c ""' + PHP_CL + '" -v"';
var full = execute(command + '" 2>&1"');
@@ -2511,6 +2516,13 @@ function toolset_setup_linker()
function toolset_setup_common_cflags()
{
+ // CFLAGS for building the PHP dll
+ DEFINE("CFLAGS_PHP", "/D _USRDLL /D PHP7DLLTS_EXPORTS /D PHP_EXPORTS \
+ /D LIBZEND_EXPORTS /D TSRM_EXPORTS /D SAPI_EXPORTS /D WINVER=" + WINVER);
+
+ DEFINE('CFLAGS_PHP_OBJ', '$(CFLAGS_PHP) $(STATIC_EXT_CFLAGS)');
+
+ // General CFLAGS for building objects
DEFINE("CFLAGS", "/nologo $(BASE_INCLUDES) /D _WINDOWS \
/D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /W3 ");
@@ -2545,9 +2557,9 @@ function toolset_setup_common_cflags()
} else if (CLANG_TOOLSET) {
if (X64) {
- ADD_FLAG('CFLAGS', ' -m64 ');
+ ADD_FLAG('CFLAGS', '-m64');
} else {
- ADD_FLAG('CFLAGS', ' -m32 ');
+ ADD_FLAG('CFLAGS', '-m32');
}
ADD_FLAG("CFLAGS", " /fallback ");
}