Skip to content

Commit

Permalink
8247283: Enable the new conformant preprocessor option in Visual Studio
Browse files Browse the repository at this point in the history
Reviewed-by: erikj, djelinski
  • Loading branch information
magicus committed Sep 6, 2022
1 parent 1bed23a commit b17758a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ jobs:
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-x64
msvc-toolset-version: '14.25'
msvc-toolset-version: '14.29'
msvc-toolset-architecture: 'x86.x64'
if: needs.select.outputs.windows-x64 == 'true'

Expand Down
2 changes: 1 addition & 1 deletion doc/building.html
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ <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>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>The minimum accepted version is Visual Studio 2019 version 16.8. (Note that this version is often presented as &quot;MSVC 14.28&quot;, and reported by cl.exe as 19.28.) 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>
Expand Down
11 changes: 6 additions & 5 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,10 @@ available for this update.

### Microsoft Visual Studio

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.
The minimum accepted version is Visual Studio 2019 version 16.8. (Note that this
version is often presented as "MSVC 14.28", and reported by cl.exe as 19.28.)
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
Expand Down Expand Up @@ -1950,8 +1951,8 @@ http://openjdk.java.net/irc/).
## Editing this document
If you want to contribute changes to this document, edit `doc/building.md` and
then run `make update-build-docs` to generate the same changes in
If you want to contribute changes to this document, edit `doc/building.md` and
then run `make update-build-docs` to generate the same changes in
`doc/building.html`.
---
Expand Down
4 changes: 2 additions & 2 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced \
-qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:strictStrings -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:strictStrings -Zc:wchar_t-"
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:wchar_t-"
fi
# CFLAGS C language level for JDK sources (hotspot only uses C++)
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.20.0.0" # VS2019
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.28.0.0" # VS2019 16.8, aka MSVC 14.28
TOOLCHAIN_MINIMUM_VERSION_xlc=""

# Minimum supported linker versions, empty means unspecified
Expand Down

0 comments on commit b17758a

Please sign in to comment.