8141548: Hotspot Windows build should respect WARNINGS_AS_ERRORS
authorihse
Mon, 09 Nov 2015 10:59:59 +0100
changeset 33787 2fc5f5b34045
parent 33785 f5e6ef11d24b
child 33788 07cad4f072b5
8141548: Hotspot Windows build should respect WARNINGS_AS_ERRORS Reviewed-by: erikj, dholmes
hotspot/make/windows/makefiles/compile.make
hotspot/make/windows/makefiles/defs.make
--- a/hotspot/make/windows/makefiles/compile.make	Fri Nov 06 09:58:06 2015 -0800
+++ b/hotspot/make/windows/makefiles/compile.make	Mon Nov 09 10:59:59 2015 +0100
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Generic compiler settings
@@ -54,7 +54,11 @@
 # improving the quality of crash log stack traces involving jvm.dll.
 
 # These are always used in all compiles
-CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX
+CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3
+
+!if "$(WARNINGS_AS_ERRORS)" != "false"
+CXX_FLAGS=$(CXX_FLAGS) /WX
+!endif
 
 # Let's add debug information when Full Debug Symbols is enabled
 !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
@@ -167,7 +171,7 @@
 !endif
 
 
-!if $(MSC_VER) >= 1600 
+!if $(MSC_VER) >= 1600
 LD_FLAGS= $(LD_FLAGS) psapi.lib
 !endif
 
@@ -191,4 +195,3 @@
 !if "$(MFC_DEBUG)" == "true"
 RC_FLAGS = $(RC_FLAGS) /D "_DEBUG"
 !endif
-
--- a/hotspot/make/windows/makefiles/defs.make	Fri Nov 06 09:58:06 2015 -0800
+++ b/hotspot/make/windows/makefiles/defs.make	Mon Nov 09 10:59:59 2015 +0100
@@ -31,6 +31,8 @@
 SLASH_JAVA ?= J:
 PATH_SEP = ;
 
+MAKE_ARGS += WARNINGS_AS_ERRORS=$(WARNINGS_AS_ERRORS)
+
 # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
 ifeq ($(ARCH_DATA_MODEL),32)
   ARCH_DATA_MODEL=32