diff make/windows/makefiles/sa.make @ 427:3c07cda72b7d

6764892: VS2008 changes required to compile hotspot sources Summary: Minor changes required to build using the Visual Studio 2008 compiler Reviewed-by: kvn, ohair
author tbell
date Tue, 11 Nov 2008 22:01:08 -0800
parents 25c3145237c6
children b6272ef4a18f
line wrap: on
line diff
--- a/make/windows/makefiles/sa.make	Fri Nov 07 13:55:14 2008 -0800
+++ b/make/windows/makefiles/sa.make	Tue Nov 11 22:01:08 2008 -0800
@@ -92,13 +92,18 @@
 !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 @@
 <<
 	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 :