8072897: File sawindbg.dll has incorrect file version
Reviewed-by: tbell, dholmes
--- a/hotspot/make/windows/makefiles/sa.make Fri Mar 13 20:44:57 2015 +0000
+++ b/hotspot/make/windows/makefiles/sa.make Wed Mar 18 10:22:24 2015 +0100
@@ -91,6 +91,9 @@
SAWINDBG=sawindbg.dll
+# Resource file containing VERSIONINFO
+SA_Res_Files=.\version.sares
+
checkAndBuildSA:: $(SAWINDBG)
# These do not need to be optimized (don't run a lot of code) and it
@@ -126,10 +129,13 @@
# Note that we do not keep sawindbj.obj around as it would then
# get included in the dumpbin command in build_vm_def.sh
+# Force resources to be rebuilt every time
+$(SA_Res_Files): FORCE
+
# 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): $(SASRCFILES)
+$(SAWINDBG): $(SASRCFILES) $(SA_Res_Files)
set INCLUDE=$(SA_INCLUDE)$(INCLUDE)
$(CXX) @<<
-I"$(BootStrapDir)/include" -I"$(BootStrapDir)/include/win32"
@@ -138,7 +144,7 @@
-out:$*.obj
<<
set LIB=$(SA_LIB)$(LIB)
- $(LD) -out:$@ -DLL sawindbg.obj sadis.obj dbgeng.lib $(SA_LFLAGS)
+ $(LD) -out:$@ -DLL sawindbg.obj sadis.obj dbgeng.lib $(SA_LFLAGS) $(SA_Res_Files)
!if "$(MT)" != ""
$(MT) -manifest $(@F).manifest -outputresource:$(@F);#2
!endif
@@ -150,6 +156,9 @@
!endif
-@rm -f $*.obj
+{$(COMMONSRC)\os\windows\vm}.rc.sares:
+ @$(RC) $(RC_FLAGS) /D "HS_FNAME=$(SAWINDBG)" /fo"$@" $<
+
cleanall :
rm -rf $(GENERATED)/saclasses
rm -rf $(GENERATED)/sa-jdi.jar