make FORCE_COMPILE_ALL more flexible than all or nothing

Rename it to FORCE_COMPILE and it takes the --enable-symbols
specification of what to include, for example
FORCE_COMPILE="all -sw/ -Library_sc".

Change-Id: I92afd8e0abc75d3566285c197d6640c26c03db36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122248
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
This commit is contained in:
Luboš Luňák 2021-09-17 14:19:47 +02:00
parent 328c12a9a0
commit 8d8d25f5dd
19 changed files with 84 additions and 50 deletions

View file

@ -34,8 +34,13 @@ Rewriters analyse and possibly modify given source files.
Usage: `make COMPILER_PLUGIN_TOOL=<rewriter_name>`
Additional optional make arguments:
- it is possible to also pass `FORCE_COMPILE_ALL=1` to make to trigger rebuild of all source files,
even those that are up to date.
- it is possible to also pass `FORCE_COMPILE=all` to make to trigger rebuild of all source files,
even those that are up to date. FORCE_COMPILE takes a list of gbuild targets specifying
where to run the rewriter ('all' means everything, '-' prepended means to not enable, '/' appended means
everything in the directory; there is no ordering, more specific overrides
more general, and disabling takes precedence).
Example: FORCE_COMPILE="all -sw/ -Library_sc"
- `UPDATE_FILES=<scope>` - limits which modified files will be actually written back with the changes
- `mainfile` - only the main `.cxx` file will be modified (default)
- `all` - all source files involved will be modified (possibly even header files from other LO modules),
@ -54,7 +59,7 @@ all non-rewriter plugins; and all non--dual-mode plugins are disabled). The
typical process to use such a dual-mode rewriter X in rewriting mode is
make COMPILER_PLUGIN_WARNINGS_ONLY=X \
&& make COMPILER_PLUGIN_TOOL=X FORCE_COMPILE_ALL=1 UPDATE_FILES=all
&& make COMPILER_PLUGIN_TOOL=X FORCE_COMPILE=all UPDATE_FILES=all
which first generates a full build without failing due to warnings from plugin
X in non-rewriting mode (in case of `--enable-werror`) and then repeats the build

View file

@ -17,9 +17,9 @@
* Changes calls to tools::Rectangle/Point/Size methods that return a ref to instead call the setter methods.
*
* run as:
* make COMPILER_PLUGIN_TOOL=changetoolsgen UPDATE_FILES=all FORCE_COMPILE_ALL=1
* make COMPILER_PLUGIN_TOOL=changetoolsgen UPDATE_FILES=all FORCE_COMPILE=all
* or
* make <module> COMPILER_PLUGIN_TOOL=changetoolsgen FORCE_COMPILE_ALL=1
* make <module> COMPILER_PLUGIN_TOOL=changetoolsgen FORCE_COMPILE=all
*/
namespace

View file

@ -22,7 +22,7 @@
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='constantparam' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='constantparam' check
$ ./compilerplugins/clang/constantparam.py
TODO look for OUString and OString params and check for call-params that are always either "" or default constructed

View file

@ -34,11 +34,11 @@ Look for fields that are only assigned to in the constructor using field-init, a
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='constfields' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='constfields' check
$ ./compilerplugins/clang/constfields.py
and then
$ for dir in *; do make $dir FORCE_COMPILE_ALL=1 UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='constfieldsrewrite' $dir; done
$ for dir in *; do make $dir FORCE_COMPILE=all UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='constfieldsrewrite' $dir; done
to auto-remove the method declarations
*/

View file

@ -22,7 +22,7 @@
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='countusersofdefaultparams' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='countusersofdefaultparams' check
$ ./compilerplugins/clang/countusersofdefaultparams.py
*/

View file

@ -26,7 +26,7 @@ some method calls
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='finalclasses' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='finalclasses' check
$ ./compilerplugins/clang/finalclasses.py
*/

View file

@ -28,11 +28,11 @@ Be warned that it produces around 5G of log file.
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='inlinefields' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='inlinefields' check
$ ./compilerplugins/clang/inlinefields.py
and then
$ for dir in *; do make FORCE_COMPILE_ALL=1 UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='inlinefieldsremove' $dir; done
$ for dir in *; do make FORCE_COMPILE=all UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='inlinefieldsremove' $dir; done
to auto-remove the method declarations
Note that the actual process may involve a fair amount of undoing, hand editing, and general messing around

View file

@ -32,7 +32,7 @@ Then
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='mergeclasses' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='mergeclasses' check
$ ./compilerplugins/clang/mergeclasses.py
FIXME exclude 'static-only' classes, which some people may use/have used instead of a namespace to tie together a bunch of functions

View file

@ -35,7 +35,7 @@ Then we will post-process the log file with a python script, which takes about
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='methodcycles' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='methodcycles' check
$ ./compilerplugins/clang/methodcycles.py
Note that the actual process may involve a fair amount of undoing, hand editing, and general messing around

View file

@ -32,7 +32,7 @@ Be warned that it produces around 5G of log file.
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='singlevalfields' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='singlevalfields' check
$ ./compilerplugins/clang/singlevalfields.py
Note that the actual process may involve a fair amount of undoing, hand editing, and general messing around

View file

@ -16,7 +16,7 @@
/**
* Rewrites all Paint method on subclasses of vcl::Window to include RenderContext& as parameter.
*
* run as: make COMPILER_PLUGIN_TOOL=paintmethodconversion UPDATE_FILES=all FORCE_COMPILE_ALL=1
* run as: make COMPILER_PLUGIN_TOOL=paintmethodconversion UPDATE_FILES=all FORCE_COMPILE=all
*/
namespace

View file

@ -24,9 +24,9 @@ that no longer has a purpose.
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='unnecessaryvirtual' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='unnecessaryvirtual' check
$ ./compilerplugins/clang/unnecessaryvirtual.py
$ for dir in *; do make FORCE_COMPILE_ALL=1 UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='removevirtuals' $dir; done
$ for dir in *; do make FORCE_COMPILE=all UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='removevirtuals' $dir; done
Note that the actual process may involve a fair amount of undoing, hand editing, and general messing around
to get it to work :-)

View file

@ -29,7 +29,7 @@ Be warned that it produces around 5G of log file.
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='unusedenumconstants' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='unusedenumconstants' check
$ ./compilerplugins/clang/unusedenumconstants.py
Note that the actual process may involve a fair amount of undoing, hand editing, and general messing around

View file

@ -41,11 +41,11 @@ Be warned that it produces around 5G of log file.
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='unusedfields' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='unusedfields' check
$ ./compilerplugins/clang/unusedfields.py
and then
$ for dir in *; do make FORCE_COMPILE_ALL=1 UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='unusedfieldsremove' $dir; done
$ for dir in *; do make FORCE_COMPILE=all UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='unusedfieldsremove' $dir; done
to auto-remove the method declarations
Note that the actual process may involve a fair amount of undoing, hand editing, and general messing around

View file

@ -33,11 +33,11 @@ Be warned that it produces around 15G of log file.
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='unusedmethods' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='unusedmethods' check
$ ./compilerplugins/clang/unusedmethods.py
and then
$ for dir in *; do make FORCE_COMPILE_ALL=1 UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='unusedmethodsremove' $dir; done
$ for dir in *; do make FORCE_COMPILE=all UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='unusedmethodsremove' $dir; done
to auto-remove the method declarations
Note that the actual process may involve a fair amount of undoing, hand editing, and general messing around

View file

@ -24,9 +24,9 @@ Look for virtual methods where all of the overrides either
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='VirtualDead' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='VirtualDead' check
$ ./compilerplugins/clang/VirtualDead.py
$ for dir in *; do make FORCE_COMPILE_ALL=1 UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='removevirtuals' $dir; done
$ for dir in *; do make FORCE_COMPILE=all UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='removevirtuals' $dir; done
Note that the actual process may involve a fair amount of undoing, hand editing, and general messing around
to get it to work :-)

View file

@ -20,7 +20,7 @@ methods, which indicates a places where the virtual-ness is unwarranted, normall
The process goes something like this:
$ make check
$ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='VirtualDown' check
$ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='VirtualDown' check
$ ./compilerplugins/clang/VirtualDown.py
@TODO for some reason, we get false+ for operator== methods

View file

@ -220,22 +220,45 @@ endef
# dep file as a side effect.
# In the dep file rule just touch it so it's newer than the object.
ifneq ($(FORCE_COMPILE_ALL),)
# Setting FORCE_COMPILE allows forcing compilation for specific sources,
# usually used to force running a tool on the sources (see compilerplugins/README).
# If set, it'll force all considered sources for rebuild. But it's possible
# to explicitly specify gbuild build targets where running of the tool will be skipped
# (where 'all' means everything, '-' prepended means to not enable, '/' appended means
# everything in the directory; there is no ordering, more specific overrides
# more general, and disabling takes precedence).
# Example: FORCE_COMPILE="all -sw/ -Library_sc"
# Detect whether forced compile should be used for the given gbuild target.
# enable if: no "-TARGET" defined AND [module is enabled OR "TARGET" defined]
# call gb_LinkTarget__force_compile,linktargetmakefilename
gb_LinkTarget__force_compile = \
$(and $(if $(filter -$(1),$(FORCE_COMPILE)),,$(true)),\
$(or $(gb_Module_CURRENTMODULE_FORCE_COMPILE),\
$(filter $(1),$(FORCE_COMPILE))))
# This one only exists to force .c/.cxx "rebuilds" when running a compiler tool.
.PHONY: force_compile_all_target
force_compile_all_target:
gb_FORCE_COMPILE_ALL_TARGET := force_compile_all_target
.PHONY: force_compile_target
force_compile_target:
ifneq ($(FORCE_COMPILE),)
gb_FORCE_COMPILE_TARGET := force_compile_target
endif
# A tool is run either if FORCE_COMPILE is not set (in that case it's always run,
# because the target is not up to date), or if FORCE_COMPILE is set then
# the tool is run only if the value of FORCE_COMPILE includes the target.
gb_LinkTarget__tool_compile_enabled = \
$(if $(FORCE_COMPILE),$(T_FORCE_COMPILE),$(true))
# CObject class
gb_CObject_get_source = $(1)/$(2).c
ifneq ($(COMPILER_EXTERNAL_TOOL)$(COMPILER_PLUGIN_TOOL),)
$(call gb_CObject_get_target,%) : $(call gb_CObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_ALL_TARGET)
$(call gb_CObject_get_target,%) : $(call gb_CObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_TARGET)
$(call gb_Output_announce,$*.c,$(true),C ,3)
$(call gb_Trace_StartRange,$*.c,C )
$(call gb_CObject__tool_command,$*,$<,$(COMPILER_PLUGINS))
$(if $(call gb_LinkTarget__tool_compile_enabled),$(call gb_CObject__tool_command,$*,$<,$(COMPILER_PLUGINS)))
$(call gb_Trace_EndRange,$*.c,C )
else
$(call gb_CObject_get_target,%) : $(call gb_CObject_get_source,$(SRCDIR),%)
@ -294,10 +317,10 @@ endif
endef
ifneq ($(COMPILER_EXTERNAL_TOOL)$(COMPILER_PLUGIN_TOOL),)
$(call gb_CxxObject_get_target,%) : $(call gb_CxxObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_ALL_TARGET)
$(call gb_CxxObject_get_target,%) : $(call gb_CxxObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_TARGET)
$(call gb_Output_announce,$*.cxx,$(true),CXX,3)
$(call gb_Trace_StartRange,$*.cxx,CXX)
$(call gb_CxxObject__tool_command,$*,$<,$(COMPILER_PLUGINS))
$(if $(call gb_LinkTarget__tool_compile_enabled),$(call gb_CxxObject__tool_command,$*,$<,$(COMPILER_PLUGINS)))
$(call gb_Trace_EndRange,$*.cxx,CXX)
else
$(call gb_CxxObject_get_target,%) : $(call gb_CxxObject_get_source,$(SRCDIR),%)
@ -326,11 +349,11 @@ endif
gb_GenCObject_get_source = $(WORKDIR)/$(1).c
ifneq ($(COMPILER_EXTERNAL_TOOL)$(COMPILER_PLUGIN_TOOL),)
$(call gb_GenCObject_get_target,%) : $(gb_FORCE_COMPILE_ALL_TARGET)
$(call gb_GenCObject_get_target,%) : $(gb_FORCE_COMPILE_TARGET)
$(call gb_Output_announce,$*.c,$(true),C ,3)
$(call gb_Trace_StartRange,$*.c,C )
test -f $(call gb_GenCObject_get_source,$*) || (echo "Missing generated source file $(call gb_GenCObject_get_source,$*)" && false)
$(call gb_CObject__tool_command,$*,$(call gb_GenCObject_get_source,$*),$(COMPILER_PLUGINS))
$(if $(call gb_LinkTarget__tool_compile_enabled),$(call gb_CObject__tool_command,$*,$(call gb_GenCObject_get_source,$*),$(COMPILER_PLUGINS)))
$(call gb_Trace_EndRange,$*.c,C )
else
$(call gb_GenCObject_get_target,%) :
@ -359,11 +382,11 @@ endif
gb_GenCxxObject_get_source = $(WORKDIR)/$(1).$(gb_LinkTarget_CXX_SUFFIX_$(call gb_LinkTarget__get_workdir_linktargetname,$(2)))
ifneq ($(COMPILER_EXTERNAL_TOOL)$(COMPILER_PLUGIN_TOOL),)
$(call gb_GenCxxObject_get_target,%) : $(gb_FORCE_COMPILE_ALL_TARGET)
$(call gb_GenCxxObject_get_target,%) : $(gb_FORCE_COMPILE_TARGET)
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$(GEN_CXX_SOURCE)),$(true),CXX,3)
$(call gb_Trace_StartRange,$(subst $(BUILDDIR)/,,$(GEN_CXX_SOURCE)),CXX)
test -f $(GEN_CXX_SOURCE) || (echo "Missing generated source file $(GEN_CXX_SOURCE)" && false)
$(call gb_CxxObject__tool_command,$*,$(GEN_CXX_SOURCE),$(COMPILER_PLUGINS))
$(if $(call gb_LinkTarget__tool_compile_enabled),$(call gb_CxxObject__tool_command,$*,$(GEN_CXX_SOURCE),$(COMPILER_PLUGINS)))
$(call gb_Trace_EndRange,$(subst $(BUILDDIR)/,,$(GEN_CXX_SOURCE)),CXX)
else
$(call gb_GenCxxObject_get_target,%) :
@ -393,11 +416,11 @@ endif
gb_GenCxxClrObject_get_source = $(WORKDIR)/$(1).$(gb_LinkTarget_CXX_SUFFIX_$(call gb_LinkTarget__get_workdir_linktargetname,$(2)))
ifneq ($(COMPILER_EXTERNAL_TOOL)$(COMPILER_PLUGIN_TOOL),)
$(call gb_GenCxxClrObject_get_target,%) : $(gb_FORCE_COMPILE_ALL_TARGET)
$(call gb_GenCxxClrObject_get_target,%) : $(gb_FORCE_COMPILE_TARGET)
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$(GEN_CXXCLR_SOURCE)),$(true),CLR,3)
$(call gb_Trace_StartRange,$(subst $(BUILDDIR)/,,$(GEN_CXXCLR_SOURCE)),CLR)
test -f $(GEN_CXXCLR_SOURCE) || (echo "Missing generated source file $(GEN_CXXCLR_SOURCE)" && false)
$(call gb_CxxClrObject__tool_command,$*,$(GEN_CXXCLR_SOURCE),$(COMPILER_PLUGINS))
$(if $(call gb_LinkTarget__tool_compile_enabled),$(call gb_CxxClrObject__tool_command,$*,$(GEN_CXXCLR_SOURCE),$(COMPILER_PLUGINS)))
$(call gb_Trace_EndRange,$(subst $(BUILDDIR)/,,$(GEN_CXXCLR_SOURCE)),CLR)
else
$(call gb_GenCxxClrObject_get_target,%) :
@ -485,10 +508,10 @@ endef
gb_ObjCxxObject_get_source = $(1)/$(2).mm
ifneq ($(COMPILER_EXTERNAL_TOOL)$(COMPILER_PLUGIN_TOOL),)
$(call gb_ObjCxxObject_get_target,%) : $(call gb_ObjCxxObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_ALL_TARGET)
$(call gb_ObjCxxObject_get_target,%) : $(call gb_ObjCxxObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_TARGET)
$(call gb_Output_announce,$*.mm,$(true),OCX,3)
$(call gb_Trace_StartRange,$*.mm,OCX)
$(call gb_ObjCxxObject__tool_command,$*,$<,$(COMPILER_PLUGINS))
$(if $(call gb_LinkTarget__tool_compile_enabled),$(call gb_ObjCxxObject__tool_command,$*,$<,$(COMPILER_PLUGINS)))
$(call gb_Trace_EndRange,$*.mm,OCX)
else
$(call gb_ObjCxxObject_get_target,%) : $(call gb_ObjCxxObject_get_source,$(SRCDIR),%)
@ -517,10 +540,10 @@ endif
gb_ObjCObject_get_source = $(1)/$(2).m
ifneq ($(COMPILER_EXTERNAL_TOOL)$(COMPILER_PLUGIN_TOOL),)
$(call gb_ObjCObject_get_target,%) : $(call gb_ObjCObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_ALL_TARGET)
$(call gb_ObjCObject_get_target,%) : $(call gb_ObjCObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_TARGET)
$(call gb_Output_announce,$*.m,$(true),OCC,3)
$(call gb_Trace_StartRange,$*.m,OCC)
$(call gb_ObjCObject__tool_command,$*,$<,$(COMPILER_PLUGINS))
$(if $(call gb_LinkTarget__tool_compile_enabled),$(call gb_ObjCObject__tool_command,$*,$<,$(COMPILER_PLUGINS)))
$(call gb_Trace_EndRange,$*.m,OCC)
else
$(call gb_ObjCObject_get_target,%) : $(call gb_ObjCObject_get_source,$(SRCDIR),%)
@ -548,11 +571,11 @@ endif
gb_GenObjCObject_get_source = $(WORKDIR)/$(1).m
ifneq ($(COMPILER_EXTERNAL_TOOL)$(COMPILER_PLUGIN_TOOL),)
$(call gb_GenObjCObject_get_target,%) : $(gb_FORCE_COMPILE_ALL_TARGET)
$(call gb_GenObjCObject_get_target,%) : $(gb_FORCE_COMPILE_TARGET)
$(call gb_Output_announce,$*.m,$(true),OCC,3)
$(call gb_Trace_StartRange,$*.m,OCC)
test -f $(call gb_GenObjCObject_get_source,$*) || (echo "Missing generated source file $(call gb_GenObjCObject_get_source,$*)" && false)
$(call gb_ObjCObject__tool_command,$*,$(call gb_GenObjCObject_get_source,$*),$(COMPILER_PLUGINS))
$(if $(call gb_LinkTarget__tool_compile_enabled),$(call gb_ObjCObject__tool_command,$*,$(call gb_GenObjCObject_get_source,$*),$(COMPILER_PLUGINS)))
$(call gb_Trace_EndRange,$*.m,OCC)
else
$(call gb_GenObjCObject_get_target,%) :
@ -581,11 +604,11 @@ endif
gb_GenObjCxxObject_get_source = $(WORKDIR)/$(1).mm
ifneq ($(COMPILER_EXTERNAL_TOOL)$(COMPILER_PLUGIN_TOOL),)
$(call gb_GenObjCxxObject_get_target,%) : $(gb_FORCE_COMPILE_ALL_TARGET)
$(call gb_GenObjCxxObject_get_target,%) : $(gb_FORCE_COMPILE_TARGET)
$(call gb_Output_announce,$*.mm,$(true),OCX,3)
$(call gb_Trace_StartRange,$*.mm,OCX)
test -f $(call gb_GenObjCxxObject_get_source,$*) || (echo "Missing generated source file $(call gb_GenObjCxxObject_get_source,$*)" && false)
$(call gb_ObjCxxObject__tool_command,$*,$(call gb_GenObjCxxObject_get_source,$*),$(COMPILER_PLUGINS))
$(if $(call gb_LinkTarget__tool_compile_enabled),$(call gb_ObjCxxObject__tool_command,$*,$(call gb_GenObjCxxObject_get_source,$*),$(COMPILER_PLUGINS)))
$(call gb_Trace_EndRange,$*.mm,OCX)
else
$(call gb_GenObjCxxObject_get_target,%) :
@ -615,10 +638,10 @@ endif
gb_CxxClrObject_get_source = $(1)/$(2).cxx
ifneq ($(COMPILER_EXTERNAL_TOOL)$(COMPILER_PLUGIN_TOOL),)
$(call gb_CxxClrObject_get_target,%) : $(call gb_CxxClrObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_ALL_TARGET)
$(call gb_CxxClrObject_get_target,%) : $(call gb_CxxClrObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_TARGET)
$(call gb_Output_announce,$*.cxx,$(true),CLR,3)
$(call gb_Trace_StartRange,$*.cxx,CLR)
$(call gb_CxxClrObject__tool_command,$*,$<,$(COMPILER_PLUGINS))
$(if $(call gb_LinkTarget__tool_compile_enabled),$(call gb_CxxClrObject__tool_command,$*,$<,$(COMPILER_PLUGINS)))
$(call gb_Trace_EndRange,$*.cxx,CLR)
else
$(call gb_CxxClrObject_get_target,%) : $(call gb_CxxClrObject_get_source,$(SRCDIR),%)
@ -944,6 +967,7 @@ $(call gb_LinkTarget_get_target,$(1)) : EXTERNAL_CODE :=
$(call gb_LinkTarget_get_target,$(1)) : SOVERSIONSCRIPT :=
$(call gb_LinkTarget_get_target,$(1)) : COMPILER_TEST :=
$(call gb_LinkTarget_get_target,$(1)) : T_SYMBOLS := $(if $(call gb_LinkTarget__symbols_enabled,$(2)),$(true),$(false))
$(call gb_LinkTarget_get_target,$(1)) : T_FORCE_COMPILE := $(if $(call gb_LinkTarget__force_compile,$(2)),$(true),$(false))
$(call gb_LinkTarget_get_target,$(1)) : T_CC :=
$(call gb_LinkTarget_get_target,$(1)) : T_CXX :=
$(call gb_LinkTarget_get_target,$(1)) : T_USE_LD := $(USE_LD)

View file

@ -252,6 +252,10 @@ $(WORKDIR)/pot.done : $(foreach exec,cfgex helpex localize propex ulfex xrmex tr
gb_Module__symbols_enabled = \
$(and $(if $(filter -$(1)/,$(gb_ENABLE_SYMBOLS_FOR)),,$(true)),\
$(filter all $(1)/,$(gb_ENABLE_SYMBOLS_FOR)))
# enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined]
gb_Module__force_compile = \
$(and $(if $(filter -$(1)/,$(FORCE_COMPILE)),,$(true)),\
$(filter all $(1)/,$(FORCE_COMPILE)))
define gb_Module_Module
gb_Module_ALLMODULES += $(1)
@ -267,6 +271,7 @@ gb_Module_STAGINGCHECKTARGETSTACK := $(call gb_Module_get_stagingcheck_target,$(
gb_Module_PERFCHECKTARGETSTACK := $(call gb_Module_get_perfcheck_target,$(1)) $(gb_Module_PERFCHECKTARGETSTACK)
gb_Module_CLEANTARGETSTACK := $(call gb_Module_get_clean_target,$(1)) $(gb_Module_CLEANTARGETSTACK)
gb_Module_CURRENTMODULE_SYMBOLS_ENABLED := $(call gb_Module__symbols_enabled,$(1))
gb_Module_CURRENTMODULE_FORCE_COMPILE := $(call gb_Module__force_compile,$(1))
gb_Module_CURRENTMODULE_NAME := $(1)
$(call gb_Helper_make_userfriendly_targets,$(1),Module)
$(if $(filter-out libreoffice instsetoo_native android ios,$(1)),\