mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.1'
* PHP-7.1: don't fail miserably, when an unknown vc version is used
This commit is contained in:
commit
019bf13a06
1 changed files with 22 additions and 4 deletions
|
@ -2817,9 +2817,20 @@ function toolset_setup_compiler()
|
|||
ERROR("Unsupported MS C++ Compiler, VC11 (2011) minimum is required");
|
||||
}
|
||||
|
||||
AC_DEFINE('COMPILER', COMPILER_NAME, "Detected compiler version");
|
||||
DEFINE("PHP_COMPILER_SHORT", VC_VERSIONS_SHORT[VCVERS]);
|
||||
AC_DEFINE('PHP_COMPILER_ID', VC_VERSIONS_SHORT[VCVERS], "Compiler compatibility ID");
|
||||
if (undefined == COMPILER_NAME) {
|
||||
var tmp = probe_binary(PHP_CL);
|
||||
COMPILER_NAME = "MSVC " + tmp + ", untested";
|
||||
|
||||
WARNING("Using unknown MSVC version " + tmp);
|
||||
|
||||
AC_DEFINE('COMPILER', COMPILER_NAME, "Detected compiler version");
|
||||
DEFINE("PHP_COMPILER_SHORT", tmp);
|
||||
AC_DEFINE('PHP_COMPILER_ID', tmp, "Compiler compatibility ID");
|
||||
} else {
|
||||
AC_DEFINE('COMPILER', COMPILER_NAME, "Detected compiler version");
|
||||
DEFINE("PHP_COMPILER_SHORT", VC_VERSIONS_SHORT[VCVERS]);
|
||||
AC_DEFINE('PHP_COMPILER_ID', VC_VERSIONS_SHORT[VCVERS], "Compiler compatibility ID");
|
||||
}
|
||||
} else if (CLANG_TOOLSET) {
|
||||
CLANGVERS = COMPILER_NUMERIC_VERSION;
|
||||
|
||||
|
@ -2939,8 +2950,15 @@ function toolset_get_compiler_name()
|
|||
var version;
|
||||
|
||||
if (VS_TOOLSET) {
|
||||
var name = undefined;
|
||||
|
||||
version = probe_binary(PHP_CL).substr(0, 5).replace('.', '');
|
||||
return VC_VERSIONS[version];
|
||||
|
||||
if (undefined != VC_VERSIONS[version]) {
|
||||
name = VC_VERSIONS[version];
|
||||
}
|
||||
|
||||
return name;
|
||||
} else if (CLANG_TOOLSET || ICC_TOOLSET) {
|
||||
var command = 'cmd /c ""' + PHP_CL + '" -v"';
|
||||
var full = execute(command + '" 2>&1"');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue