6961079: Build JDK7 for 64 bit Windows using free Windows 7.1 SDK 64 bit compilers
authorprr
Wed, 16 Jun 2010 09:42:39 -0700
changeset 5668 15ee66161ec7
parent 5667 e9e265b814f3
child 5669 3046e368377b
6961079: Build JDK7 for 64 bit Windows using free Windows 7.1 SDK 64 bit compilers Reviewed-by: ohair, jcoomes
jdk/make/common/shared/Defs-windows.gmk
--- a/jdk/make/common/shared/Defs-windows.gmk	Mon Jun 14 10:37:29 2010 -0700
+++ b/jdk/make/common/shared/Defs-windows.gmk	Wed Jun 16 09:42:39 2010 -0700
@@ -331,23 +331,50 @@
   endif
 endif
 
-# Compilers for 64bit may be from SDK. For VS 2010 we use those.
-# The Express compilers don't contain 64 bit compilers, so in
-# that case, you additionally need the SDK. At this time,
-# there's no 64 bit SDK available that has VS 2010.
-# Presumably SDK v7.1 will provide that and we may want to update
-# the logic here to work with that.
-# However official builds will use the Professional version.
+# Compilers for 64bit may be from the free SDK, or Visual Studio Professional
+# The free Express compilers don't contain 64 bit compilers, which is why
+# you instead need the SDK.
+# So for VS2010 based builds, either VS2010 Pro with the 7.0a SDK, or
+# the Windows 7.1 standalone SDK with compilers may be used.
+# Release enginering will use VS2010 Pro, so the frequency of testing of
+# SDK based builds will depend entirely on individual usage.
 ifeq ($(ARCH_DATA_MODEL), 64)
   ifdef VS100COMNTOOLS  # /Common7/Tools directory, use ../../Vc
+    # VS2010 default location is used when building 64 bit using the 7.1 SDK
+    # This is safe to hardwire as the SDK installer won't let you change it
+    # and the VS2010 variable is only used if the compilers are from the SDK
+    xVS2010 :="$(_program_files32)/Microsoft Visual Studio 10.0/"
+    VS2010 :=$(call FullPath,$(xVS2010))
     xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))"
     _vs100tools     :=$(call FullPath,$(xVS100COMNTOOLS))
   endif
   ifneq ($(_vs100tools),)
     _compiler_bin :=$(_vs100tools)/../../Vc/bin/amd64
-    _redist_sdk   :=$(_vs100tools)/../../Vc/redist/x64/Microsoft.VC100.CRT
-    xMSSDK70      :="$(_program_files32)/Microsoft SDKs/Windows/v7.0a/"
-    MSSDK70       :=$(call FullPath,$(xMSSDK70))
+    x_redist_sdk   :=$(_vs100tools)/../../Vc/redist/x64/Microsoft.VC100.CRT
+    _redist_sdk    :=$(call FullPath,$(x_redist_sdk))
+    # The SDK doesn't have the redist directory, but the DLL is installed
+    # into the windows directory.
+    ifeq ($(_redist_sdk),)
+      _redist_sdk   :=c:/windows/system32
+    endif
+    # Not currently using MSSDK7n, but maybe we can make use of it for
+    # doing default location lookup to find some SDK tools that presently
+    # require the developer to explicitly set the path.
+    # The 7.0a path is from VS2010 Pro, the 7.1 path is the standalone SDK.
+    # Either will work for us.
+    # If a developer chooses to install the standalone SDK in some other
+    # location, then this will fail to find it, which won't matter so long as
+    # we aren't using this variable. If we do they'd still need to set the
+    # ALT_MSDEVTOOLS_PATH as now.
+    # %WindowsSdkDir% could be referenced instead but the SDK installer
+    # doesn't set it and in the case of the VS2010 compilers,
+    # you can't change this location in the installer anyway.
+    xMSSDK7n      :="$(_program_files32)/Microsoft SDKs/Windows/v7.0a/"
+    MSSDK7n       :=$(call FullPath,$(xMSSDK7n))
+    ifeq ($(MSSDK7n),)
+      xMSSDK7n      :="$(_program_files32)/Microsoft SDKs/Windows/v7.1/"
+      MSSDK7n       :=$(call FullPath,$(xMSSDK7n))
+    endif
   else
     xVS2008 :="$(_program_files32)/Microsoft Visual Studio 9.0/"
     VS2008 :=$(call FullPath,$(xVS2008))
@@ -355,7 +382,7 @@
       _compiler_bin :=$(VS2008)/VC/Bin/$(ARCH)
       xMSSDK61      :="$(_program_files)/Microsoft SDKs/Windows/v6.1/"
       MSSDK61       :=$(call FullPath,$(xMSSDK61))
-      _redist_sdk   :=$(VS2008)/VC/redist/x86/Microsoft.VC90.CRT
+      _redist_sdk   :=$(VS2008)/VC/redist/x64/Microsoft.VC90.CRT
     else
       ifneq ($(_ms_sdk),)
         ifeq ($(ARCH), ia64)