com php-src: fix x64 recognition for clang and icc: win32/build/confutils.js
| From: | Anatol Belski | Date: | Fri, 07 Nov 2014 09:18:02 +0000 |
| Subject: | com php-src: fix x64 recognition for clang and icc: win32/build/confutils.js | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82984@lists.php.net to get a copy of this message | ||
Commit: ac71c5812b9246edbae7c9fe8281c1186c1b9a4a
Author: Anatol Belski <ab@php.net> Thu, 6 Nov 2014 23:15:56 +0100
Parents: cd2aa28a7d1d7049f48b66084f629d6b1552128e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ac71c5812b9246edbae7c9fe8281c1186c1b9a4a
Log:
fix x64 recognition for clang and icc
Changed paths:
M win32/build/confutils.js
Diff:
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index da54822..c2bb4b0 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -2361,16 +2361,17 @@ function toolset_get_compiler_name()
function toolset_is_64()
{
if (VS_TOOLSET) {
- return probe_binary(PHP_CL, 64, null, 'PHP_CL');
+ return probe_binary(PHP_CL, 64);
} else if (CLANG_TOOLSET) {
- /* Seems to be impossible to get it from the clang binary, so lets use the normal cl.exe,
- as clang should be running in VS environment. */
- var vs_cl = PATH_PROG('cl', null, 'PHP_CL')
- return probe_binary(vs_cl, 64);
+ var command = 'cmd /c ""' + PHP_CL + '" -v"';
+ var full = execute(command + '" 2>&1"');
+
+ return null != full.match(/x86_64/);
} else if (INTEL_TOOLSET) {
- /*seems the easiest way as well for now */
- var vs_cl = PATH_PROG('cl', null, 'PHP_CL')
- return probe_binary(vs_cl, 64);
+ var command = 'cmd /c ""' + PHP_CL + '" -v"';
+ var full = execute(command + '" 2>&1"');
+
+ return null != full.match(/Intel\(R\) 64/);
}
ERROR("Wrong toolset");