8247283: Enable the new conformant preprocessor option in Visual Studio

Reviewed-by: erikj, djelinski
This commit is contained in:
Magnus Ihse Bursie 2022-09-06 08:50:13 +00:00
parent 1bed23a1af
commit b17758a932
5 changed files with 11 additions and 10 deletions

View File

@ -234,7 +234,7 @@ jobs:
uses: ./.github/workflows/build-windows.yml uses: ./.github/workflows/build-windows.yml
with: with:
platform: windows-x64 platform: windows-x64
msvc-toolset-version: '14.25' msvc-toolset-version: '14.29'
msvc-toolset-architecture: 'x86.x64' msvc-toolset-architecture: 'x86.x64'
if: needs.select.outputs.windows-x64 == 'true' if: needs.select.outputs.windows-x64 == 'true'

View File

@ -301,7 +301,7 @@
<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>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> <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> <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 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> <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> <h3 id="ibm-xl-cc">IBM XL C/C++</h3>

View File

@ -382,9 +382,10 @@ available for this update.
### Microsoft Visual Studio ### Microsoft Visual Studio
The minimum accepted version is Visual Studio 2019 (for aarch64, at least 16.8 The minimum accepted version is Visual Studio 2019 version 16.8. (Note that this
is required). Older versions will not be accepted by `configure` and will not version is often presented as "MSVC 14.28", and reported by cl.exe as 19.28.)
work. The maximum accepted version of Visual Studio is 2022. 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 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 default pick the latest. You can request a specific version to be used by
@ -1950,8 +1951,8 @@ http://openjdk.java.net/irc/).
## Editing this document ## Editing this document
If you want to contribute changes to this document, edit `doc/building.md` and 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 then run `make update-build-docs` to generate the same changes in
`doc/building.html`. `doc/building.html`.
--- ---

View File

@ -530,8 +530,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced \ TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced \
-qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect" -qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:strictStrings -MP" TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:strictStrings -Zc:wchar_t-" TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:wchar_t-"
fi fi
# CFLAGS C language level for JDK sources (hotspot only uses C++) # CFLAGS C language level for JDK sources (hotspot only uses C++)

View File

@ -52,7 +52,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
# Minimum supported versions, empty means unspecified # Minimum supported versions, empty means unspecified
TOOLCHAIN_MINIMUM_VERSION_clang="3.5" TOOLCHAIN_MINIMUM_VERSION_clang="3.5"
TOOLCHAIN_MINIMUM_VERSION_gcc="6.0" 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="" TOOLCHAIN_MINIMUM_VERSION_xlc=""
# Minimum supported linker versions, empty means unspecified # Minimum supported linker versions, empty means unspecified