diff --git a/doc/building.html b/doc/building.html index b052cb18238..0bbe1c21ca6 100644 --- a/doc/building.html +++ b/doc/building.html @@ -300,8 +300,8 @@
It is advisable to keep an older version of Xcode for building the JDK when updating Xcode. This blog page has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use xcode-select -s
before running configure
, or use --with-toolchain-path
to point to the version of Xcode to use, e.g. configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin
If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on Problems with the Build Environment, and Getting Help to find out if there are any recent, non-merged patches available for this update.
For aarch64 machines running Windows the minimum accepted version is Visual Studio 2019 (16.8 or higher). For all other platforms the minimum accepted version of Visual Studio is 2017. Older versions will not be accepted by configure
and will not work. For all platforms the maximum accepted version of Visual Studio is 2022.
If you have multiple versions of Visual Studio installed, configure
will by default pick the latest. You can request a specific version to be used by setting --with-toolchain-version
, e.g. --with-toolchain-version=2017
.
The minimum accepted version is Visual Studio 2019 (for aarch64, at least 16.8 is required). Older versions will not be accepted by configure
and will not work. The maximum accepted version of Visual Studio is 2022.
If you have multiple versions of Visual Studio installed, configure
will by default pick the latest. You can request a specific version to be used by setting --with-toolchain-version
, e.g. --with-toolchain-version=2022
.
If you have Visual Studio installed but configure
fails to detect it, it may be because of spaces in path.
Please consult the AIX section of the Supported Build Platforms OpenJDK Build Wiki page for details about which versions of XLC are supported.
diff --git a/doc/building.md b/doc/building.md index 9c84f2f638d..0086e08edb9 100644 --- a/doc/building.md +++ b/doc/building.md @@ -382,14 +382,13 @@ available for this update. ### Microsoft Visual Studio -For aarch64 machines running Windows the minimum accepted version is Visual Studio 2019 -(16.8 or higher). For all other platforms the minimum accepted version of -Visual Studio is 2017. Older versions will not be accepted by `configure` and will -not work. For all platforms the maximum accepted version of Visual Studio is 2022. +The minimum accepted version is Visual Studio 2019 (for aarch64, at least 16.8 +is required). Older versions will not be accepted by `configure` and will not +work. The maximum accepted version of Visual Studio is 2022. If you have multiple versions of Visual Studio installed, `configure` will by default pick the latest. You can request a specific version to be used by -setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2017`. +setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2022`. If you have Visual Studio installed but `configure` fails to detect it, it may be because of [spaces in path](#spaces-in-path). diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index 5a0f5373132..4b31c07967c 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -168,10 +168,6 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS], WARNINGS_ENABLE_ALL="-W3" DISABLED_WARNINGS="4800" - if test "x$TOOLCHAIN_VERSION" = x2017; then - # VS2017 incorrectly triggers this warning for constexpr - DISABLED_WARNINGS="$DISABLED_WARNINGS 4307" - fi ;; gcc) diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4 index 8cebe3dc56f..0ba8a12ad29 100644 --- a/make/autoconf/toolchain.m4 +++ b/make/autoconf/toolchain.m4 @@ -52,7 +52,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++" # Minimum supported versions, empty means unspecified TOOLCHAIN_MINIMUM_VERSION_clang="3.5" TOOLCHAIN_MINIMUM_VERSION_gcc="6.0" -TOOLCHAIN_MINIMUM_VERSION_microsoft="19.10.0.0" # VS2017 +TOOLCHAIN_MINIMUM_VERSION_microsoft="19.20.0.0" # VS2019 TOOLCHAIN_MINIMUM_VERSION_xlc="" # Minimum supported linker versions, empty means unspecified diff --git a/make/autoconf/toolchain_microsoft.m4 b/make/autoconf/toolchain_microsoft.m4 index b47f184ea8f..948c7b923b6 100644 --- a/make/autoconf/toolchain_microsoft.m4 +++ b/make/autoconf/toolchain_microsoft.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,21 +25,7 @@ ################################################################################ # The order of these defines the priority by which we try to find them. -VALID_VS_VERSIONS="2019 2017 2022" - -VS_DESCRIPTION_2017="Microsoft Visual Studio 2017" -VS_VERSION_INTERNAL_2017=141 -VS_MSVCR_2017=vcruntime140.dll -VS_MSVCP_2017=msvcp140.dll -VS_ENVVAR_2017="VS150COMNTOOLS" -VS_USE_UCRT_2017="true" -VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017" -VS_EDITIONS_2017="BuildTools Community Professional Enterprise" -VS_SDK_INSTALLDIR_2017= -VS_VS_PLATFORM_NAME_2017="v141" -VS_SDK_PLATFORM_NAME_2017= -VS_SUPPORTED_2017=true -VS_TOOLSET_SUPPORTED_2017=true +VALID_VS_VERSIONS="2022 2019" VS_DESCRIPTION_2019="Microsoft Visual Studio 2019" VS_VERSION_INTERNAL_2019=142 @@ -84,7 +70,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT], UTIL_FIXUP_PATH(VS_BASE, NOFAIL) if test "x$VS_BASE" != x && test -d "$VS_BASE"; then - # In VS 2017 and VS 2019, the default installation is in a subdir named after the edition. + # In VS 2019, the default installation is in a subdir named after the edition. # Find the first one present and use that. if test "x$VS_EDITIONS" != x; then for edition in $VS_EDITIONS; do @@ -172,11 +158,9 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT], # build environment and assigns it to VS_ENV_CMD AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE], [ - # VS2017 provides the option to install previous minor versions of the MSVC - # toolsets. It is not possible to directly download earlier minor versions of - # VS2017 and in order to build with a previous minor compiler toolset version, - # it is now possible to compile with earlier minor versions by passing - # -vcvars_ver=