diff --git a/make/windows/makefiles/adlc.make b/make/windows/makefiles/adlc.make index b2f8132c64dd6743642f996cc57725966e60d9ae..b6feb0e78b9c718a59b73f5e281555c45d5977e1 100644 --- a/make/windows/makefiles/adlc.make +++ b/make/windows/makefiles/adlc.make @@ -102,6 +102,12 @@ GENERATED_NAMES_IN_INCL=\ adlc.exe: main.obj adlparse.obj archDesc.obj arena.obj dfa.obj dict2.obj filebuff.obj \ forms.obj formsopt.obj formssel.obj opcodes.obj output_c.obj output_h.obj $(LINK) $(LINK_FLAGS) /subsystem:console /out:$@ $** +!if "$(MT)" != "" +# The previous link command created a .manifest file that we want to +# insert into the linked artifact so we do not need to track it +# separately. Use ";#2" for .dll and ";#1" for .exe: + $(MT) /manifest $@.manifest /outputresource:$@;#1 +!endif $(GENERATED_NAMES_IN_INCL): $(Platform_arch_model).ad adlc.exe includeDB.current rm -f $(GENERATED_NAMES) diff --git a/make/windows/makefiles/compile.make b/make/windows/makefiles/compile.make index bf6f3be9b2e1b9b2ad3b866e60f719da4f9591a4..ddc9ea11a9f99f98e372d72e21c57b0f416141fb 100644 --- a/make/windows/makefiles/compile.make +++ b/make/windows/makefiles/compile.make @@ -30,7 +30,7 @@ CPP=cl.exe # /W3 Warning level 3 # /Zi Include debugging information # /WX Treat any warning error as a fatal error -# /MD Use dynamic multi-threaded runtime (msvcrt.dll or msvc*71.dll) +# /MD Use dynamic multi-threaded runtime (msvcrt.dll or msvc*NN.dll) # /MTd Use static multi-threaded runtime debug versions # /O1 Optimize for size (/Os), skips /Oi # /O2 Optimize for speed (/Ot), adds /Oi to /O1 @@ -80,8 +80,10 @@ CPP_FLAGS=$(CPP_FLAGS) /D "IA32" CPP=ARCH_ERROR !endif -# MSC_VER is a 4 digit number that tells us what compiler is being used, it is -# generated when the local.make file is created by the script gen_msc_ver.sh. +# MSC_VER is a 4 digit number that tells us what compiler is being used +# and is generated when the local.make file is created by build.make +# via the script get_msc_ver.sh +# # If MSC_VER is set, it overrides the above default setting. # But it should be set. # Possible values: @@ -89,13 +91,14 @@ CPP=ARCH_ERROR # 1300 and 1310 is VS2003 or VC7 # 1399 is our fake number for the VS2005 compiler that really isn't 1400 # 1400 is for VS2005 +# 1500 is for VS2008 # Do not confuse this MSC_VER with the predefined macro _MSC_VER that the # compiler provides, when MSC_VER==1399, _MSC_VER will be 1400. # Normally they are the same, but a pre-release of the VS2005 compilers # in the Windows 64bit Platform SDK said it was 1400 when it was really # closer to VS2003 in terms of option spellings, so we use 1399 for that # 1400 version that really isn't 1400. -# See the file gen_msc_ver.sh for more info. +# See the file get_msc_ver.sh for more info. !if "x$(MSC_VER)" == "x" COMPILER_NAME=$(DEFAULT_COMPILER_NAME) !else @@ -115,6 +118,9 @@ COMPILER_NAME=VS2003 !if "$(MSC_VER)" == "1400" COMPILER_NAME=VS2005 !endif +!if "$(MSC_VER)" == "1500" +COMPILER_NAME=VS2008 +!endif !endif # Add what version of the compiler we think this is to the compile line @@ -160,7 +166,25 @@ GX_OPTION = /EHsc # externals at link time. Even with /GS-, you need bufferoverflowU.lib. # NOTE: Currently we decided to not use /GS- BUFFEROVERFLOWLIB = bufferoverflowU.lib -LINK_FLAGS = $(LINK_FLAGS) $(BUFFEROVERFLOWLIB) +LINK_FLAGS = /manifest $(LINK_FLAGS) $(BUFFEROVERFLOWLIB) +# Manifest Tool - used in VS2005 and later to adjust manifests stored +# as resources inside build artifacts. +MT=mt.exe +!if "$(BUILDARCH)" == "i486" +# VS2005 on x86 restricts the use of certain libc functions without this +CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_DEPRECATE +!endif +!endif + +!if "$(COMPILER_NAME)" == "VS2008" +PRODUCT_OPT_OPTION = /O2 /Oy- +FASTDEBUG_OPT_OPTION = /O2 /Oy- +DEBUG_OPT_OPTION = /Od +GX_OPTION = /EHsc +LINK_FLAGS = /manifest $(LINK_FLAGS) +# Manifest Tool - used in VS2005 and later to adjust manifests stored +# as resources inside build artifacts. +MT=mt.exe !if "$(BUILDARCH)" == "i486" # VS2005 on x86 restricts the use of certain libc functions without this CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_DEPRECATE diff --git a/make/windows/makefiles/debug.make b/make/windows/makefiles/debug.make index afd987d9cd0bd3ce956b662e2c75abe773e9646f..9bb52cce24c23196fe9f069fbd120066f54faaa2 100644 --- a/make/windows/makefiles/debug.make +++ b/make/windows/makefiles/debug.make @@ -50,6 +50,12 @@ $(AOUT): $(Res_Files) $(Obj_Files) $(LINK) @<< $(LINK_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files) << +!if "$(MT)" != "" +# The previous link command created a .manifest file that we want to +# insert into the linked artifact so we do not need to track it +# separately. Use ";#2" for .dll and ";#1" for .exe: + $(MT) /manifest $@.manifest /outputresource:$@;#2 +!endif !include $(WorkSpace)/make/windows/makefiles/shared.make !include $(WorkSpace)/make/windows/makefiles/sa.make diff --git a/make/windows/makefiles/defs.make b/make/windows/makefiles/defs.make index 4b2fc14b3e2238160ae12078cfa4cc0fbb20ba08..c264f9fd103ecfdd87b82e93b957c7f9185e5550 100644 --- a/make/windows/makefiles/defs.make +++ b/make/windows/makefiles/defs.make @@ -25,7 +25,7 @@ # The common definitions for hotspot windows builds. # Include the top level defs.make under make directory instead of this one. # This file is included into make/defs.make. -# On windows it is only used to construct parameters for +# On windows it is only used to construct parameters for # make/windows/build.make when make/Makefile is used to build VM. SLASH_JAVA ?= J: @@ -69,7 +69,7 @@ endif JDK_INCLUDE_SUBDIR=win32 -# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined +# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined # and added to MAKE_ARGS list in $(GAMMADIR)/make/defs.make. # next parameters are defined in $(GAMMADIR)/make/defs.make. @@ -125,7 +125,7 @@ ifneq ($(ALT_BUILD_WIN_SA),) endif ifeq ($(BUILD_WIN_SA), 1) - ifeq ($(ARCH),ia64) + ifeq ($(ARCH),ia64) BUILD_WIN_SA = 0 endif endif @@ -154,7 +154,7 @@ ifeq ($(BUILD_WIN_SA), 1) EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.dll EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.pdb EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.map - EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar + EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar # Must pass this down to nmake. MAKE_ARGS += BUILD_WIN_SA=1 endif diff --git a/make/windows/makefiles/fastdebug.make b/make/windows/makefiles/fastdebug.make index 064592bffe4828cfb53aa8fe96c090ba9957dcdc..e15aaaae4931f46bf19ea09200e170e6c08be084 100644 --- a/make/windows/makefiles/fastdebug.make +++ b/make/windows/makefiles/fastdebug.make @@ -50,6 +50,13 @@ $(AOUT): $(Res_Files) $(Obj_Files) $(LINK) @<< $(LINK_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files) << +!if "$(MT)" != "" +# The previous link command created a .manifest file that we want to +# insert into the linked artifact so we do not need to track it +# separately. Use ";#2" for .dll and ";#1" for .exe: + $(MT) /manifest $@.manifest /outputresource:$@;#2 +!endif + !include $(WorkSpace)/make/windows/makefiles/shared.make !include $(WorkSpace)/make/windows/makefiles/sa.make diff --git a/make/windows/makefiles/product.make b/make/windows/makefiles/product.make index a143d6c99b5424d125cb4b8161610942e13cbc9d..a26ffbcffd317360846a448fd79dc6fdd0b05e7d 100644 --- a/make/windows/makefiles/product.make +++ b/make/windows/makefiles/product.make @@ -61,6 +61,12 @@ $(AOUT): $(Res_Files) $(Obj_Files) $(LINK_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files) << !endif +!if "$(MT)" != "" +# The previous link command created a .manifest file that we want to +# insert into the linked artifact so we do not need to track it +# separately. Use ";#2" for .dll and ";#1" for .exe: + $(MT) /manifest $@.manifest /outputresource:$@;#2 +!endif !include $(WorkSpace)/make/windows/makefiles/shared.make !include $(WorkSpace)/make/windows/makefiles/sa.make diff --git a/make/windows/makefiles/sa.make b/make/windows/makefiles/sa.make index 57fd493f8238d8156e3f53b8dcadec52d12c6f8e..01886c13804a413b880f6518f4da4d1cb209569a 100644 --- a/make/windows/makefiles/sa.make +++ b/make/windows/makefiles/sa.make @@ -92,13 +92,18 @@ SA_LINK_FLAGS = bufferoverflowU.lib !else SA_CFLAGS = /nologo $(MS_RUNTIME_OPTION) /W3 /Gm $(GX_OPTION) /ZI /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c !endif - +!if "$(MT)" != "" + SA_LINK_FLAGS = /manifest $(SA_LINK_FLAGS) +!endif SASRCFILE = $(AGENT_DIR)/src/os/win32/windbg/sawindbg.cpp SA_LFLAGS = $(SA_LINK_FLAGS) /nologo /subsystem:console /map /debug /machine:$(MACHINE) # Note that we do not keep sawindbj.obj around as it would then # get included in the dumpbin command in build_vm_def.sh +# In VS2005 or VS2008 the link command creates a .manifest file that we want +# to insert into the linked artifact so we do not need to track it separately. +# Use ";#2" for .dll and ";#1" for .exe in the MT command below: $(SAWINDBG): $(SASRCFILE) set INCLUDE=$(SA_INCLUDE)$(INCLUDE) $(CPP) @<< @@ -109,6 +114,9 @@ $(SAWINDBG): $(SASRCFILE) << set LIB=$(SA_LIB)$(LIB) $(LINK) /out:$@ /DLL sawindbg.obj dbgeng.lib $(SA_LFLAGS) +!if "$(MT)" != "" + $(MT) /manifest $(@F).manifest /outputresource:$(@F);#2 +!endif -@rm -f sawindbg.obj cleanall : diff --git a/src/cpu/x86/vm/register_definitions_x86.cpp b/src/cpu/x86/vm/register_definitions_x86.cpp index 1be2c138211498ea2b7a502d4a6deb3b047dbc60..0aceac814055839aaa26cf919c27cd82e935975e 100644 --- a/src/cpu/x86/vm/register_definitions_x86.cpp +++ b/src/cpu/x86/vm/register_definitions_x86.cpp @@ -22,9 +22,6 @@ * */ -// make sure the defines don't screw up the declarations later on in this file -#define DONT_USE_REGISTER_DEFINES - #include "incls/_precompiled.incl" #include "incls/_register_definitions_x86.cpp.incl"