com php-src: This should be the last of the old VC stuff in the Windows build system, also up the check to require VC11 now: win32/build/config.w32
win32/build/config.w32.phpize.in win32/build/confutils.js

From: Date: Sun, 29 Mar 2015 06:05:42 +0000
Subject: com php-src: This should be the last of the old VC stuff in the Windows build system, also up the check to require VC11 now: 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-85904@lists.php.net to get a copy of this message
Commit: a7b4f32519321392d93383afbf6e68f0a61702ac Author: Kalle Sommer Nielsen <kalle@php.net> Sun, 29 Mar 2015 08:05:42 +0200 Parents: 0ca8ffa2b8ae899d8a771af1250037a9f5e9698b Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a7b4f32519321392d93383afbf6e68f0a61702ac Log: This should be the last of the old VC stuff in the Windows build system, also up the check to require VC11 now 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 ad3209f..d5ce9bf 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -62,7 +62,7 @@ toolset_setup_common_cflags(); ARG_WITH('mp', 'Tell Visual Studio use up to [n,auto,disable] processes for compilation', 'auto'); var PHP_MP_DISABLED = true; -if (VS_TOOLSET && VCVERS >= 1500 && PHP_MP != 'disable') { +if (VS_TOOLSET && PHP_MP != 'disable') { // no from disable-all if(PHP_MP == 'auto' || PHP_MP == 'no') { ADD_FLAG('CFLAGS', ' /MP '); @@ -144,9 +144,7 @@ ADD_SOURCES("Zend", "zend_language_parser.c zend_language_scanner.c \ ADD_FLAG("CFLAGS_BD_ZEND", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); /* XXX inspect this for other toolsets */ -if (VS_TOOLSET && VCVERS == 1200) { - AC_DEFINE('ZEND_DVAL_TO_LVAL_CAST_OK', 1); -} +//AC_DEFINE('ZEND_DVAL_TO_LVAL_CAST_OK', 1); ADD_SOURCES("main", "main.c snprintf.c spprintf.c getopt.c fopen_wrappers.c \ php_scandir.c php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \ @@ -155,9 +153,7 @@ ADD_SOURCES("main", "main.c snprintf.c spprintf.c getopt.c fopen_wrappers.c \ ADD_FLAG("CFLAGS_BD_MAIN", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); ADD_SOURCES("win32", "inet.c fnmatch.c sockets.c"); -if (VS_TOOLSET && VCVERS >= 1400 || !VS_TOOLSET) { - AC_DEFINE('HAVE_STRNLEN', 1); -} +AC_DEFINE('HAVE_STRNLEN', 1); ADD_SOURCES("main/streams", "streams.c cast.c memory.c filter.c plain_wrapper.c \ userspace.c transports.c xp_socket.c mmap.c glob_wrapper.c"); diff --git a/win32/build/config.w32.phpize.in b/win32/build/config.w32.phpize.in index 32b8f82..061fb6d 100644 --- a/win32/build/config.w32.phpize.in +++ b/win32/build/config.w32.phpize.in @@ -46,7 +46,7 @@ toolset_setup_common_cflags(); ARG_WITH('prefix', 'PHP installation prefix', ''); ARG_WITH('mp', 'Tell Visual Studio use up to [n,auto,disable] processes for compilation', 'auto'); var PHP_MP_DISABLED = true; -if (VS_TOOLSET && VCVERS >= 1500 && PHP_MP != 'disable') { +if (VS_TOOLSET && PHP_MP != 'disable') { // no from disable-all if(PHP_MP == 'auto' || PHP_MP == 'no') { ADD_FLAG('CFLAGS', ' /MP '); @@ -106,13 +106,9 @@ STDOUT.WriteLine("Build dir: " + get_define('BUILD_DIR')); STDOUT.WriteLine("PHP Core: " + get_define('PHPDLL') + " and " + get_define('PHPLIB')); /* XXX inspect this for other toolsets */ -if (VS_TOOLSET && VCVERS == 1200) { - AC_DEFINE('ZEND_DVAL_TO_LVAL_CAST_OK', 1); -} +//AC_DEFINE('ZEND_DVAL_TO_LVAL_CAST_OK', 1); -if (!VS_TOOLSET || VS_TOOLSET && VCVERS >= 1400) { - AC_DEFINE('HAVE_STRNLEN', 1); -} +AC_DEFINE('HAVE_STRNLEN', 1); STDOUT.WriteBlankLines(1); diff --git a/win32/build/confutils.js b/win32/build/confutils.js index d3258af..e9c6e16 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -2381,11 +2381,14 @@ function toolset_setup_compiler() // 1400 is vs.net 2005 // 1500 is vs.net 2008 // 1600 is vs.net 2010 - // Which version of the compiler do we have? + // 1700 is vs.net 2011 + // 1800 is vs.net 2012 + // 1900 is vs.net 2014 + // Which version of the compiler do we have?12 VCVERS = COMPILER_NUMERIC_VERSION; - if (VCVERS < 1500) { - ERROR("Unsupported MS C++ Compiler, VC9 (2008) minimum is required"); + if (VCVERS < 1700) { + ERROR("Unsupported MS C++ Compiler, VC11 (2011) minimum is required"); } AC_DEFINE('COMPILER', COMPILER_NAME, "Detected compiler version"); @@ -2446,8 +2449,8 @@ function toolset_setup_project_tools() // avoid picking up midnight commander from cygwin PATH_PROG('mc', WshShell.Environment("Process").Item("PATH")); - // Try locating manifest tool - if (VS_TOOLSET && VCVERS > 1200) { + // Try locating the manifest tool + if (VS_TOOLSET) { PATH_PROG('mt', WshShell.Environment("Process").Item("PATH")); } } @@ -2591,7 +2594,7 @@ function toolset_setup_common_cflags() /D LIBZEND_EXPORTS /D TSRM_EXPORTS /D SAPI_EXPORTS /D WINVER=" + WINVER); DEFINE('CFLAGS_PHP_OBJ', '$(CFLAGS_PHP) $(STATIC_EXT_CFLAGS)'); - +1 // 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"); @@ -2599,30 +2602,18 @@ function toolset_setup_common_cflags() if (VS_TOOLSET) { ADD_FLAG("CFLAGS", " /FD "); - if (VCVERS < 1400) { - // Enable automatic precompiled headers - ADD_FLAG('CFLAGS', ' /YX '); - - if (PHP_DEBUG == "yes") { - // Set some debug/release specific options - ADD_FLAG('CFLAGS', ' /GZ '); - } + // fun stuff: MS deprecated ANSI stdio and similar functions + // disable annoying warnings. In addition, time_t defaults + // to 64-bit. Ask for 32-bit. + if (X64) { + ADD_FLAG('CFLAGS', ' /wd4996 '); + } else { + ADD_FLAG('CFLAGS', ' /wd4996 /D_USE_32BIT_TIME_T=1 '); } - if (VCVERS >= 1400) { - // fun stuff: MS deprecated ANSI stdio and similar functions - // disable annoying warnings. In addition, time_t defaults - // to 64-bit. Ask for 32-bit.. - if (X64) { - ADD_FLAG('CFLAGS', ' /wd4996 '); - } else { - ADD_FLAG('CFLAGS', ' /wd4996 /D_USE_32BIT_TIME_T=1 '); - } - - if (PHP_DEBUG == "yes") { - // Set some debug/release specific options - ADD_FLAG('CFLAGS', ' /RTC1 '); - } + if (PHP_DEBUG == "yes") { + // Set some debug/release specific options + ADD_FLAG('CFLAGS', ' /RTC1 '); } } else if (CLANG_TOOLSET) { @@ -2646,16 +2637,7 @@ function toolset_setup_common_ldlags() // PHP DLL link flags DEFINE("PHP_LDFLAGS", "$(DLL_LDFLAGS)"); - if (VS_TOOLSET) { - if (VCVERS >= 1700) { - DEFINE("LDFLAGS", "/nologo "); - } else { - DEFINE("LDFLAGS", "/nologo /version:" + - PHP_VERSION + "." + PHP_MINOR_VERSION + "." + PHP_RELEASE_VERSION); - } - } else { - DEFINE("LDFLAGS", "/nologo "); - } + DEFINE("LDFLAGS", "/nologo "); // we want msvcrt in the PHP DLL ADD_FLAG("PHP_LDFLAGS", "/nodefaultlib:libcmt");

« previous php.cvs (#85904) next »