com php-src: basic support for Intel Composer: win32/build/config.w32 win32/build/confutils.js
| From: | Anatol Belski | Date: | Fri, 07 Nov 2014 09:18:01 +0000 |
| Subject: | com php-src: basic support for Intel Composer: win32/build/config.w32 win32/build/confutils.js | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82975@lists.php.net to get a copy of this message | ||
Commit: cd2aa28a7d1d7049f48b66084f629d6b1552128e
Author: Anatol Belski <ab@php.net> Thu, 6 Nov 2014 23:04:53 +0100
Parents: 876c7c451c69b2df9ed368bcdc8532fc1c2bceca
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cd2aa28a7d1d7049f48b66084f629d6b1552128e
Log:
basic support for Intel Composer
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 c06ae50..7305b48 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -3,11 +3,15 @@
// "Master" config file; think of it as a configure.in
// equivalent.
-ARG_WITH("toolset", "Toolset to use for the compilation, supported: vs, clang",
"vs");
+ARG_WITH("toolset", "Toolset to use for the compilation, supported: vs, clang,
intel", "vs");
if ("clang" == PHP_TOOLSET) {
VS_TOOLSET = false;
CLANG_TOOLSET = true;
INTEL_TOOLSET = false;
+} else if ("intel" == PHP_TOOLSET) {
+ VS_TOOLSET = false;
+ CLANG_TOOLSET = false;
+ INTEL_TOOLSET = true;
} else {
/* Visual Studio is the default toolset. */
PHP_TOOLSET = "no" == PHP_TOOLSET ? "vs" : PHP_TOOLSET;
@@ -56,8 +60,11 @@ if (VS_TOOLSET) {
AC_DEFINE('PHP_COMPILER_ID', "clang"); /* XXX something better were to write
here */
} else if (INTEL_TOOLSET) {
- //INTELVERS = compiler_ver;
- // ....
+ INTELVERS = COMPILER_NUMERIC_VERSION;
+
+ AC_DEFINE('COMPILER', COMPILER_NAME, "Detected compiler version");
+ DEFINE("PHP_COMPILER_SHORT", "icc");
+ AC_DEFINE('PHP_COMPILER_ID', "icc"); /* XXX something better were to write
here */
}
STDOUT.WriteLine(" Detected compiler " + COMPILER_NAME);
@@ -427,7 +434,7 @@ ADD_SOURCES("win32", "inet.c fnmatch.c sockets.c");
if (VS_TOOLSET && VCVERS <= 1300) {
ADD_SOURCES("win32", "strtoi64.c");
}
-if (VS_TOOLSET && VCVERS >= 1400) {
+if (VS_TOOLSET && VCVERS >= 1400 || INTEL_TOOLSET) {
AC_DEFINE('HAVE_STRNLEN', 1);
}
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 33fcf7c..da54822 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -2328,7 +2328,7 @@ function toolset_get_compiler_version()
var command = 'cmd /c ""' + PHP_CL + '" -v"';
var full = execute(command + '" 2>&1"');
- if (full.match(/Version (\d\.\d\.\d)/)) {
+ if (full.match(/Version (\d+\.\d+\.\d+)/)) {
version = RegExp.$1;
version = version.replace(/\./g, '');
version = version/100 < 1 ? version*10 : version;
@@ -2337,7 +2337,7 @@ function toolset_get_compiler_version()
}
}
- ERROR("Wrong toolset");
+ ERROR("Failed to parse compiler out for compiler version");
}
function toolset_get_compiler_name()
@@ -2368,7 +2368,9 @@ function toolset_is_64()
var vs_cl = PATH_PROG('cl', null, 'PHP_CL')
return probe_binary(vs_cl, 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);
}
ERROR("Wrong toolset");