mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
This should be the last of the old VC stuff in the Windows build system, also up the check to require VC11 now
This commit is contained in:
parent
0ca8ffa2b8
commit
a7b4f32519
@ -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");
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user