jvmfwk/CustomTarget_jreproperties.mk |    2 +-
 qadevOOo/Jar_OOoRunner.mk            |    3 ---
 solenv/gbuild/JavaClassSet.mk        |    8 ++------
 3 files changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 71ee4d75d34a25c56d1faf2f89ab57bf79a26e0f
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Wed Mar 20 16:52:15 2024 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Thu Mar 21 09:41:57 2024 +0100

    Tie javac -g option to --enable-symbols instead of gb_DEBUGLEVEL
    
    ...which appears to be a better fit.  Now, gb_JavaClassSet_JAVACDEBUG is
    unconditionally defined as -g, but conditionally only used if
    gb_target_symbols_enabled is true for the given target (where the target is
    spelled "Jar/..." resp. "CustomTarget_jvmfwk/jreproperties" for the
    --enable-sybmols=... mini-language in configure.ac).  Also, the odd special 
case
    to "force debug information for OOoRunner" has just been dropped.
    
    Change-Id: Ief10efc689d65e2f50888d3e96cb40f43cbb1b2d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165071
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/jvmfwk/CustomTarget_jreproperties.mk 
b/jvmfwk/CustomTarget_jreproperties.mk
index da509dbff5ac..0d6399a19369 100644
--- a/jvmfwk/CustomTarget_jreproperties.mk
+++ b/jvmfwk/CustomTarget_jreproperties.mk
@@ -17,7 +17,7 @@ $(call 
gb_CustomTarget_get_workdir,jvmfwk/jreproperties)/JREProperties.class : \
        $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JCS,1)
        $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),JCS)
        $(call gb_Helper_abbreviate_dirs, \
-       cd $(dir $@) && $(call gb_JavaClassSet_JAVACCOMMAND,$(JAVA_TARGET_VER)) 
 $(gb_JavaClassSet_JAVACDEBUG) -d $(dir $@) $^)
+       cd $(dir $@) && $(call gb_JavaClassSet_JAVACCOMMAND,$(JAVA_TARGET_VER)) 
 $(if $(call 
gb_target_symbols_enabled,CustomTarget_jvmfwk/jreproperties),$(gb_JavaClassSet_JAVACDEBUG))
 -d $(dir $@) $^)
        $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),JCS)
 
 # vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index e0514bc74b30..a5e71210948d 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -8,9 +8,6 @@
 #
 #
 
-#force debug information for OOoRunner
-gb_JavaClassSet_JAVACDEBUG:= -g
-
 $(eval $(call gb_Jar_Jar,OOoRunner))
 
 $(eval $(call gb_Jar_add_manifest_classpath,OOoRunner,\
diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index 8acf120dd615..8b769624c12e 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -23,15 +23,11 @@ gb_JavaClassSet_JAVACCOMMAND = $(ICECREAM_RUN) 
$(JAVACOMPILER) $(JAVACFLAGS) \
     -Xlint:-options \
     -Xlint:unchecked
 
-gb_JavaClassSet_JAVACDEBUG :=
-
 # Enforces correct dependency order for possibly generated stuff:
 # generated sources, jars/classdirs etc.
 gb_JavaClassSet_get_preparation_target = $(WORKDIR)/JavaClassSet/$(1).prepared
 
-ifneq ($(gb_DEBUGLEVEL),0)
 gb_JavaClassSet_JAVACDEBUG := -g
-endif
 
 # $(PACKAGEDIRS) inherited from Jar -- assumption is the last part of the path
 # is top-level java package directory
@@ -46,7 +42,7 @@ $(call gb_Helper_abbreviate_dirs,\
                RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),\
                        $(filter-out $(JARDEPS) $(T_JAVA9FILES),$(4))) && \
                $(if $(3),$(call 
gb_JavaClassSet_JAVACCOMMAND,$(JAVA_TARGET_VER)) \
-                       $(gb_JavaClassSet_JAVACDEBUG) \
+                       $(if $(call 
gb_target_symbols_enabled,$(2)),$(gb_JavaClassSet_JAVACDEBUG)) \
                        -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call 
gb_JavaClassSet_get_classdir,$(2))" \
                        -d $(call gb_JavaClassSet_get_classdir,$(2)) \
                        @$$RESPONSEFILE &&) \
@@ -55,7 +51,7 @@ $(call gb_Helper_abbreviate_dirs,\
                        RESPONSEFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),\
                                $(T_JAVA9FILES)) && \
                        $(if $(3),$(call gb_JavaClassSet_JAVACCOMMAND,9) \
-                               $(gb_JavaClassSet_JAVACDEBUG) \
+                               $(if $(call 
gb_target_symbols_enabled,$(2)),$(gb_JavaClassSet_JAVACDEBUG)) \
                                -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call 
gb_JavaClassSet_get_classdir,$(2))" \
                                --module-path "$(T_CP)$(gb_CLASSPATHSEP)$(call 
gb_JavaClassSet_get_classdir,$(2))" \
                                $(if $(T_MODULENAME),--patch-module 
$(T_MODULENAME)="$(subst $(WHITESPACE),$(gb_CLASSPATHSEP),$(strip $(dir 
$(PACKAGEDIRS))))") \

Reply via email to