6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
Reviewed-by: tbell
diff --git a/make/common/shared/Defs-java.gmk b/make/common/shared/Defs-java.gmk
index b3e0270..179e53a 100644
--- a/make/common/shared/Defs-java.gmk
+++ b/make/common/shared/Defs-java.gmk
@@ -107,7 +107,10 @@
 ifeq ($(DEBUG_CLASSFILES),true)
   JAVACFLAGS += -g
 endif
-ifeq ($(COMPILER_WARNINGS_FATAL), true)
+ifeq ($(JAVAC_MAX_WARNINGS), true)
+  JAVACFLAGS  += -Xlint:all
+endif
+ifeq ($(JAVAC_WARNINGS_FATAL), true)
   JAVACFLAGS  += -Werror
 endif
 
@@ -180,7 +183,10 @@
 # The javac options supplied to the boot javac is limited. This compiler
 #   should only be used to build the 'make/tools' sources, which are not
 #   class files that end up in the classes directory.
-ifeq ($(COMPILER_WARNINGS_FATAL), true)
+ifeq ($(JAVAC_MAX_WARNINGS), true)
+  BOOT_JAVACFLAGS  += -Xlint:all
+endif
+ifeq ($(JAVAC_WARNINGS_FATAL), true)
   BOOT_JAVACFLAGS  += -Werror
 endif
 BOOT_JAVACFLAGS  += -encoding ascii