changeset 57517:ca3387704361

8236110: Windows (MSVC 2013) build failures after JDK-8233299 Reviewed-by: erikj
author stefank
date Thu, 19 Dec 2019 14:19:34 +0100
parents 75931341b227
children fb606350b732
files make/autoconf/hotspot.m4
diffstat 1 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/make/autoconf/hotspot.m4	Thu Dec 19 03:46:03 2019 +0100
+++ b/make/autoconf/hotspot.m4	Thu Dec 19 14:19:34 2019 +0100
@@ -345,10 +345,27 @@
   fi
 
   # Only enable ZGC on supported platforms
+  if (test "x$OPENJDK_TARGET_OS" = "xwindows" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"); then
+    AC_MSG_CHECKING([if zgc can be built on windows])
+    AC_COMPILE_IFELSE(
+      [AC_LANG_PROGRAM([[#include <windows.h>]],
+        [[struct MEM_EXTENDED_PARAMETER x;]])
+      ],
+      [
+        AC_MSG_RESULT([yes])
+        CAN_BUILD_ZGC_ON_WINDOWS="yes"
+      ],
+      [
+        AC_MSG_RESULT([no, missing required APIs])
+        CAN_BUILD_ZGC_ON_WINDOWS="no"
+      ]
+    )
+  fi
+
   AC_MSG_CHECKING([if zgc can be built])
   if (test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64") || \
      (test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xaarch64") || \
-     (test "x$OPENJDK_TARGET_OS" = "xwindows" && test "x$OPENJDK_TARGET_CPU" = "xx86_64") || \
+     (test "x$CAN_BUILD_ZGC_ON_WINDOWS" = "xyes") || \
      (test "x$OPENJDK_TARGET_OS" = "xmacosx" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"); then
     AC_MSG_RESULT([yes])
   else