Skip to content

Commit

Permalink
8293162: Drop support for VS2017
Browse files Browse the repository at this point in the history
Reviewed-by: erikj, kbarrett
  • Loading branch information
magicus committed Aug 31, 2022
1 parent 12317ef commit dd54153
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 45 deletions.
4 changes: 2 additions & 2 deletions doc/building.html
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ <h3 id="apple-xcode">Apple Xcode</h3>
<p>It is advisable to keep an older version of Xcode for building the JDK when updating Xcode. This <a href="http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html">blog page</a> has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use <code>xcode-select -s</code> before running <code>configure</code>, or use <code>--with-toolchain-path</code> to point to the version of Xcode to use, e.g. <code>configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin</code></p>
<p>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 <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>
<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
<p>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 <code>configure</code> and will not work. For all platforms the maximum accepted version of Visual Studio is 2022.</p>
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2017</code>.</p>
<p>The minimum accepted version is Visual Studio 2019 (for aarch64, at least 16.8 is required). Older versions will not be accepted by <code>configure</code> and will not work. The maximum accepted version of Visual Studio is 2022.</p>
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2022</code>.</p>
<p>If you have Visual Studio installed but <code>configure</code> fails to detect it, it may be because of <a href="#spaces-in-path">spaces in path</a>.</p>
<h3 id="ibm-xl-cc">IBM XL C/C++</h3>
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of XLC are supported.</p>
Expand Down
9 changes: 4 additions & 5 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 0 additions & 4 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion make/autoconf/toolchain.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 9 additions & 30 deletions make/autoconf/toolchain_microsoft.m4
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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=<toolset_version> argument to vcvarsall.bat.
# Since VS2017 MS provides the option to install previous minor versions of
# the toolset. In order to build with a previous minor compiler toolset
# version, pass -vcvars_ver=<toolset_version> argument to vcvarsall.bat.
AC_ARG_WITH(msvc-toolset-version, [AS_HELP_STRING([--with-msvc-toolset-version],
[specific MSVC toolset version to use, passed as -vcvars_ver argument to
pass to vcvarsall.bat (Windows only)])])
Expand Down Expand Up @@ -494,14 +478,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
if test "x$MSVC_DLL" = x; then
if test "x$VCINSTALLDIR" != x; then
if test "$VS_VERSION" -lt 2017; then
# Probe: Using well-known location from Visual Studio 12.0 and older
POSSIBLE_MSVC_DLL="$VCINSTALLDIR/redist/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME"
else
# Probe: Using well-known location from VS 2017 and VS 2019
POSSIBLE_MSVC_DLL="`ls $VCToolsRedistDir/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME 2> /dev/null`"
fi
# In case any of the above finds more than one file, loop over them.
# Probe: Using well-known location
POSSIBLE_MSVC_DLL="`ls $VCToolsRedistDir/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME 2> /dev/null`"
# If the above finds more than one file, loop over them.
for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$possible_msvc_dll],
[well-known location in VCINSTALLDIR])
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/runtime/atomic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ class Atomic : AllStatic {
atomic_memory_order order = memory_order_conservative);

private:
WINDOWS_ONLY(public:) // VS2017 warns (C2027) use of undefined type if IsPointerConvertible is declared private
// Test whether From is implicitly convertible to To.
// From and To must be pointer types.
// Note: Provides the limited subset of C++11 std::is_convertible
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/runtime/continuationFreezeThaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2501,10 +2501,10 @@ class ConfigResolve {
static void resolve() {
typedef Config<use_compressed ? oop_kind::NARROW : oop_kind::WIDE, BarrierSetT> SelectedConfigT;

freeze_entry = (address)(void*)freeze<SelectedConfigT>;
freeze_entry = (address)freeze<SelectedConfigT>;

// If we wanted, we could templatize by kind and have three different thaw entries
thaw_entry = (address)(void*)thaw<SelectedConfigT>;
thaw_entry = (address)thaw<SelectedConfigT>;
}
};

Expand Down

0 comments on commit dd54153

Please sign in to comment.