summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-11-06 23:04:53 +0100
committerAnatol Belski <ab@php.net>2014-11-07 10:18:01 +0100
commitcd2aa28a7d1d7049f48b66084f629d6b1552128e (patch)
treeb3f4be55376dea6d4201dc09515e7436efa2af8b /win32
parent876c7c451c69b2df9ed368bcdc8532fc1c2bceca (diff)
downloadphp-git-cd2aa28a7d1d7049f48b66084f629d6b1552128e.tar.gz
basic support for Intel Composer
Diffstat (limited to 'win32')
-rw-r--r--win32/build/config.w3215
-rw-r--r--win32/build/confutils.js8
2 files changed, 16 insertions, 7 deletions
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index c06ae509b7..7305b480dc 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 33fcf7ce73..da548225de 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");