JDK9: Build wb.jar which depends on JDK9 API
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Thu Oct 29 13:43:57 UTC 2015
Hi,
Quick question: I have to use Java9 API in sun.misc.WhiteBox, but right
now it is built using BOOT_JDK. Does the following change [1] look good?
The following dependency seems too conservative (depends on hotspot
which is not necessary):
build-test-lib: $(JAVA_TARGETS)
but I haven't found how to enumerate only JDK modules:
Thanks!
Best regards,
Vladimir Ivanov
[1] diff --git a/make/Main.gmk b/make/Main.gmk
--- a/make/Main.gmk
+++ b/make/Main.gmk
@@ -452,6 +452,8 @@
test-make: clean-test-make
+ build-test-lib: $(JAVA_TARGETS)
+
build-test-hotspot-jtreg-native: buildtools-jdk
build-test-jdk-jtreg-native: buildtools-jdk
diff --git a/make/test/BuildTestLib.gmk b/make/test/BuildTestLib.gmk
--- a/make/test/BuildTestLib.gmk
+++ b/make/test/BuildTestLib.gmk
@@ -35,14 +35,8 @@
TEST_LIB_SOURCE_DIR := $(TOPDIR)/test/lib
TEST_LIB_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/lib
-# Unfortunately, test-lib.jar does not compile properly without warnings.
-$(eval $(call SetupJavaCompiler, BOOT_JAVAC_NOWARNINGS, \
- JAVAC := $(JAVAC), \
- FLAGS := -XDignore.symbol.file=true -g, \
-))
-
$(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
- SETUP := BOOT_JAVAC, \
+ SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(TEST_LIB_SOURCE_DIR)/sun, \
BIN := $(TEST_LIB_SUPPORT), \
JAR := $(TEST_LIB_SUPPORT)/wb.jar, \
@@ -52,7 +46,7 @@
# test-lib.jar will contain only hprof classes until JDK-8081381 is
resolved
$(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
- SETUP := BOOT_JAVAC_NOWARNINGS, \
+ SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(TEST_LIB_SOURCE_DIR)/share/classes/jdk/test/lib/hprof, \
BIN := $(TEST_LIB_SUPPORT), \
JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
More information about the build-dev
mailing list