Skip to content

Commit

Permalink
8321060: [8u] hotspot needs to recognise VS2022
Browse files Browse the repository at this point in the history
Reviewed-by: phh
  • Loading branch information
mrserb committed Feb 7, 2024
1 parent 15e2c0b commit f4f45e3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
18 changes: 18 additions & 0 deletions hotspot/make/windows/makefiles/compile.make
Expand Up @@ -172,6 +172,9 @@ COMPILER_NAME=VS2017
!if "$(MSC_VER)" >= "1920" && "$(MSC_VER)" <= "1929"
COMPILER_NAME=VS2019
!endif
!if "$(MSC_VER)" >= "1930" && "$(MSC_VER)" <= "1938"
COMPILER_NAME=VS2022
!endif
!endif

# By default, we do not want to use the debug version of the msvcrt.dll file
Expand Down Expand Up @@ -336,6 +339,21 @@ MT=mt.exe
SAFESEH_FLAG = /SAFESEH
!endif

!if "$(COMPILER_NAME)" == "VS2022"
PRODUCT_OPT_OPTION = /O2 /Oy-
FASTDEBUG_OPT_OPTION = /O2 /Oy-
DEBUG_OPT_OPTION = /Od
GX_OPTION = /EHsc
LD_FLAGS = /manifest $(LD_FLAGS)
MP_FLAG = /MP
# Manifest Tool - used in VS2005 and later to adjust manifests stored
# as resources inside build artifacts.
!if "x$(MT)" == "x"
MT=mt.exe
!endif
SAFESEH_FLAG = /SAFESEH
!endif

!if "$(BUILDARCH)" == "i486"
LD_FLAGS = $(SAFESEH_FLAG) $(LD_FLAGS)
!endif
Expand Down
4 changes: 4 additions & 0 deletions hotspot/make/windows/makefiles/sanity.make
Expand Up @@ -33,6 +33,8 @@ checkCL:
if "$(MSC_VER)" NEQ "1912" \
if "$(MSC_VER)" NEQ "1920" if "$(MSC_VER)" NEQ "1921" if "$(MSC_VER)" NEQ "1922" if "$(MSC_VER)" NEQ "1923" if "$(MSC_VER)" NEQ "1924" \
if "$(MSC_VER)" NEQ "1925" if "$(MSC_VER)" NEQ "1926" if "$(MSC_VER)" NEQ "1927" if "$(MSC_VER)" NEQ "1928" if "$(MSC_VER)" NEQ "1929" \
if "$(MSC_VER)" NEQ "1930" if "$(MSC_VER)" NEQ "1931" if "$(MSC_VER)" NEQ "1932" if "$(MSC_VER)" NEQ "1933" if "$(MSC_VER)" NEQ "1934" \
if "$(MSC_VER)" NEQ "1935" if "$(MSC_VER)" NEQ "1936" if "$(MSC_VER)" NEQ "1937" if "$(MSC_VER)" NEQ "1938" \
echo *** WARNING *** unrecognized cl.exe version $(MSC_VER) ($(RAW_MSC_VER)). Use FORCE_MSC_VER to override automatic detection.

checkLink:
Expand All @@ -43,4 +45,6 @@ checkLink:
if "$(LD_VER)" NEQ "1412" \
if "$(LD_VER)" NEQ "1420" if "$(LD_VER)" NEQ "1421" if "$(LD_VER)" NEQ "1422" if "$(LD_VER)" NEQ "1423" if "$(LD_VER)" NEQ "1424" \
if "$(LD_VER)" NEQ "1425" if "$(LD_VER)" NEQ "1426" if "$(LD_VER)" NEQ "1427" if "$(LD_VER)" NEQ "1428" if "$(LD_VER)" NEQ "1429" \
if "$(LD_VER)" NEQ "1430" if "$(LD_VER)" NEQ "1431" if "$(LD_VER)" NEQ "1432" if "$(LD_VER)" NEQ "1433" if "$(LD_VER)" NEQ "1434" \
if "$(LD_VER)" NEQ "1435" if "$(LD_VER)" NEQ "1436" if "$(LD_VER)" NEQ "1437" if "$(LD_VER)" NEQ "1438" \
echo *** WARNING *** unrecognized link.exe version $(LD_VER) ($(RAW_LD_VER)). Use FORCE_LD_VER to override automatic detection.
2 changes: 1 addition & 1 deletion hotspot/make/windows/makefiles/vm.make
Expand Up @@ -129,7 +129,7 @@ CXX_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER

!if "$(USE_PRECOMPILED_HEADER)" != "0"
CXX_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
!if "$(COMPILER_NAME)" == "VS2012" || "$(COMPILER_NAME)" == "VS2013" || "$(COMPILER_NAME)" == "VS2015" || "$(COMPILER_NAME)" == "VS2017" || "$(COMPILER_NAME)" == "VS2019"
!if "$(COMPILER_NAME)" == "VS2012" || "$(COMPILER_NAME)" == "VS2013" || "$(COMPILER_NAME)" == "VS2015" || "$(COMPILER_NAME)" == "VS2017" || "$(COMPILER_NAME)" == "VS2019" || "$(COMPILER_NAME)" == "VS2022"
# VS2012 and later require this object file to be listed:
LD_FLAGS=$(LD_FLAGS) _build_pch_file.obj
!endif
Expand Down

1 comment on commit f4f45e3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.