Skip to content

Commit

Permalink
8297329: [8u] hotspot needs to recognise VS2019
Browse files Browse the repository at this point in the history
Reviewed-by: phh
  • Loading branch information
Alexey Pavlyutkin authored and Yuri Nesterenko committed Dec 1, 2022
1 parent e9acfce commit 7b54850
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 @@ -169,6 +169,9 @@ COMPILER_NAME=VS2017
!if "$(MSC_VER)" == "1916"
COMPILER_NAME=VS2017
!endif
!if "$(MSC_VER)" >= "1920" && "$(MSC_VER)" <= "1929"
COMPILER_NAME=VS2019
!endif
!endif

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

!if "$(COMPILER_NAME)" == "VS2019"
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 @@ -31,6 +31,8 @@ checkCL:
if "$(MSC_VER)" NEQ "1800" \
if "$(MSC_VER)" NEQ "1900" \
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" \
echo *** WARNING *** unrecognized cl.exe version $(MSC_VER) ($(RAW_MSC_VER)). Use FORCE_MSC_VER to override automatic detection.

checkLink:
Expand All @@ -39,4 +41,6 @@ checkLink:
if "$(LD_VER)" NEQ "1300" \
if "$(LD_VER)" NEQ "1400" \
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" \
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"
!if "$(COMPILER_NAME)" == "VS2012" || "$(COMPILER_NAME)" == "VS2013" || "$(COMPILER_NAME)" == "VS2015" || "$(COMPILER_NAME)" == "VS2017" || "$(COMPILER_NAME)" == "VS2019"
# 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 7b54850

@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.