The simplest way to get consistency is to just remove -g from jaxp and jaxws compile lines. Providing different levels of debug info for jre and jdk would certainly be nice but has a much bigger scope.

Please review this small patch.

Bug: https://bugs.openjdk.java.net/browse/JDK-8040267
Patch:
diff -r 2d9f4166e0be make/BuildJaxws.gmk
--- a/make/BuildJaxws.gmk
+++ b/make/BuildJaxws.gmk
@@ -38,7 +38,7 @@
 $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
     JVM := $(JAVA), \
     JAVAC := $(NEW_JAVAC), \
-    FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXWS_WARNINGS) -g, \
+    FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXWS_WARNINGS), \
     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))

diff -r 3b360a77658e make/BuildJaxp.gmk
--- a/make/BuildJaxp.gmk
+++ b/make/BuildJaxp.gmk
@@ -38,7 +38,7 @@
 $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
     JVM := $(JAVA), \
     JAVAC := $(NEW_JAVAC), \
-    FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXP_WARNINGS) -g, \
+    FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXP_WARNINGS), \
     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))

/Erik

On 2014-04-11 16:40, Erik Joelsson wrote:
Hello,

While converting the build to the new build-infra makefiles, one thing that annoyed me was the fact that we aren't consistently compiling with or without -g for java code. In the new makefiles we just emulate the same behavior, but I would like to sort it out properly now.

Currently langtools, jaxp and jaxws repos build with -g always, while corba and jdk only build with -g when DEBUG_LEVEL is fastdebug or slowdebug.

How would we really like this to work? Is there a reason not to ship with -g enabled? I know from personal experience that I get very annoyed when I can't step into the jdk classes and look at local variable values when debugging my own java applications.

/Erik

Reply via email to