diff options
Diffstat (limited to 'win32/build/confutils.js')
-rw-r--r-- | win32/build/confutils.js | 60 |
1 files changed, 27 insertions, 33 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 2fe2039afe..e71757748f 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -1,8 +1,6 @@ // Utils for configure script /* +----------------------------------------------------------------------+ - | PHP Version 7 | - +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | @@ -95,11 +93,11 @@ if (typeof(CWD) == "undefined") { } /* defaults; we pick up the precise versions from configure.ac */ -var PHP_VERSION = 7; -var PHP_MINOR_VERSION = 4; +var PHP_VERSION = 8; +var PHP_MINOR_VERSION = 0; var PHP_RELEASE_VERSION = 0; var PHP_EXTRA_VERSION = ""; -var PHP_VERSION_STRING = "7.4.0"; +var PHP_VERSION_STRING = "8.0.0"; /* Get version numbers and DEFINE as a string */ function get_version_numbers() @@ -128,6 +126,17 @@ build_dirs = new Array(); extension_include_code = ""; extension_module_ptrs = ""; +(function () { + var wmiservice = GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2"); + var oss = wmiservice.ExecQuery("Select * from Win32_OperatingSystem"); + var os = oss.ItemIndex(0); + AC_DEFINE("PHP_BUILD_SYSTEM", os.Caption + " [" + os.Version + "]", "Windows build system version"); + var build_provider = WshShell.Environment("Process").Item("PHP_BUILD_PROVIDER"); + if (build_provider) { + AC_DEFINE("PHP_BUILD_PROVIDER", build_provider); + } +}()); + if (!MODE_PHPIZE) { get_version_numbers(); } @@ -439,12 +448,13 @@ can be built that way. \ } var snapshot_build_exclusions = new Array( - 'debug', 'crt-debug', 'lzf-better-compression', + 'debug', 'lzf-better-compression', 'php-build', 'snapshot-template', 'ereg', 'pcre-regex', 'fastcgi', 'force-cgi-redirect', 'path-info-check', 'zts', 'ipv6', 'memory-limit', 'zend-multibyte', 'fd-setsize', 'memory-manager', - 'pgi', 'pgo', 'all-shared', 'config-profile' + 'pgi', 'pgo', 'all-shared', 'config-profile', + 'sanitizer' ); var force; @@ -2016,9 +2026,6 @@ function generate_tmp_php_ini() var directive = (extensions_enabled[i][2] ? 'zend_extension' : 'extension'); var ext_name = extensions_enabled[i][0]; - if ("gd" == ext_name) { - ext_name = "gd2"; - } if (!is_on_exclude_list_for_test_ini(ext_list, ext_name)) { INI.WriteLine(directive + "=php_" + ext_name + ".dll"); @@ -2302,19 +2309,6 @@ function generate_config_h() outfile.WriteLine("#define " + keys[i] + " " + pieces); } - if (VS_TOOLSET) { - if (VCVERS >= 1800) { - outfile.WriteLine(""); - outfile.WriteLine("#define HAVE_ACOSH 1"); - outfile.WriteLine("#define HAVE_ASINH 1"); - outfile.WriteLine("#define HAVE_ATANH 1"); - } - if (VCVERS >= 1900) { - outfile.WriteLine("#define HAVE_LOG1P 1"); - } - } - - outfile.Close(); } @@ -2341,7 +2335,7 @@ function generate_phpize() MF.WriteLine("var PHP_MINOR_VERSION=" + PHP_MINOR_VERSION); MF.WriteLine("var PHP_RELEASE_VERSION=" + PHP_RELEASE_VERSION); MF.WriteBlankLines(1); - MF.WriteLine("/* Genereted extensions list with mode (static/shared) */"); + MF.WriteLine("/* Generated extensions list with mode (static/shared) */"); var count = extensions_enabled.length; for (i in extensions_enabled) { @@ -2352,7 +2346,7 @@ function generate_phpize() } MF.WriteBlankLines(2); - MF.WriteLine("/* Genereted win32/build/phpize.js.in */"); + MF.WriteLine("/* Generated win32/build/phpize.js.in */"); MF.WriteBlankLines(1); MF.Write(file_get_contents("win32/build/phpize.js.in")); MF.Close(); @@ -2436,7 +2430,7 @@ function handle_analyzer_makefile_flags(fd, key, val) { var relevant = false; - /* VS integrates /analyze with the bulid process, + /* VS integrates /analyze with the build process, no further action is required. */ if ("no" == PHP_ANALYZER || "vs" == PHP_ANALYZER) { return; @@ -3102,8 +3096,8 @@ function toolset_get_compiler_name(short) return name; } if (version >= 1920) { /* NOTE - VS is intentional. Due to changes in recent Visual Studio - versioning scheme refering to the exact VC++ version is - hardly predictable. From this version on, it refers to + versioning scheme referring to the exact VC++ version is + hardly predictable. From this version on, it refers to Visual Studio version and implies the default toolset. When new versions are introduced, adapt also checks in php_win32_image_compatible(), if needed. */ @@ -3221,7 +3215,7 @@ function toolset_setup_common_cflags() // General CFLAGS for building objects DEFINE("CFLAGS", "/nologo $(BASE_INCLUDES) /D _WINDOWS /D WINDOWS=1 \ - /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /W3 \ + /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS \ /D _USE_MATH_DEFINES"); if (envCFLAGS) { @@ -3413,7 +3407,7 @@ function toolset_setup_common_libs() function toolset_setup_build_mode() { if (PHP_DEBUG == "yes") { - ADD_FLAG("CFLAGS", "/LDd /MDd /W3 /Od /D _DEBUG /D ZEND_DEBUG=1 " + + ADD_FLAG("CFLAGS", "/LDd /MDd /Od /D _DEBUG /D ZEND_DEBUG=1 " + (X64?"/Zi":"/ZI")); ADD_FLAG("LDFLAGS", "/debug"); // Avoid problems when linking to release libraries that use the release @@ -3425,7 +3419,7 @@ function toolset_setup_build_mode() ADD_FLAG("CFLAGS", "/Zi"); ADD_FLAG("LDFLAGS", "/incremental:no /debug /opt:ref,icf"); } - ADD_FLAG("CFLAGS", "/LD /MD /W3"); + ADD_FLAG("CFLAGS", "/LD /MD"); if (PHP_SANITIZER == "yes" && CLANG_TOOLSET) { ADD_FLAG("CFLAGS", "/Od /D NDebug /D NDEBUG /D ZEND_WIN32_NEVER_INLINE /D ZEND_DEBUG=0"); } else { @@ -3669,7 +3663,7 @@ function get_clang_lib_dir() if (COMPILER_NAME_LONG.match(/clang version ([\d\.]+) \((.*)\)/)) { ver = RegExp.$1; } else { - ERROR("Faled to determine clang lib path"); + ERROR("Failed to determine clang lib path"); } if (X64) { @@ -3702,7 +3696,7 @@ function add_asan_opts(cflags_name, libs_name, ldflags_name) if (COMPILER_NAME_LONG.match(/clang version ([\d\.]+) \((.*)\)/)) { ver = RegExp.$1; } else { - ERROR("Faled to determine clang lib path"); + ERROR("Failed to determine clang lib path"); } if (!!cflags_name) { |