make/common/SetupJavaCompilers.gmk
changeset 47364 6b3389375f31
parent 45271 81a039ba9344
child 48343 d4329843abf4
--- a/make/common/SetupJavaCompilers.gmk	Thu Oct 19 10:59:02 2017 +0200
+++ b/make/common/SetupJavaCompilers.gmk	Thu Oct 19 14:16:45 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -95,4 +95,15 @@
     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
+# Use boot javac to generate JDK 8 compatible class files explicitly
+$(eval $(call SetupJavaCompiler,GENERATE_8_BYTECODE, \
+    JAVAC := $(JAVAC), \
+    FLAGS := \
+        $(JAVA_TOOL_FLAGS_SMALL) \
+        --release 8 \
+        -XDignore.symbol.file=true -g \
+        -Xlint:all -Werror, \
+    DISABLE_SJAVAC := true, \
+))
+
 endif # _SETUP_GMK