On 18/04/2010 01:57, Joshua Cranmer wrote:
REPORT_BUILD is a
macro that is called for every C++ or C file that is compiled, so if you
make -s you can still see what is being made. This is separate from the
actual compilation stuff. It's really an ugly hack.
The initial use yes, but once hijacked it's a nice way to run a custom
command on every file :-)
What's less nice is that each file gets now precompiled twice.
But I suppose the cost is not very high, the CPU cost must be really
minor compared to the optimization pass, or linking. And it's already in
the cache, so no I/O.
This overrides the static-checking stuff from the Mozilla build system.
dehydra scripts are processed on type declarations while treehydra
refers to actual code generation.
Well, if you're reading that and know the build system well :
20 DEHYDRA_ARGS = \
21 --topsrcdir=$(topsrcdir) \
22 --objdir=$(DEPTH) \
23 --dehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip
$(DEHYDRA_MODULES))) \
24 --treehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip
$(TREEHYDRA_MODULES))) \
25 $(NULL)
26
27 DEHYDRA_FLAGS = -fplugin=$(DEHYDRA_PATH)
-fplugin-arg='$(DEHYDRA_SCRIPT) $(DEHYDRA_ARGS)'
28
29 ifdef DEHYDRA_PATH
30 OS_CXXFLAGS += $(DEHYDRA_FLAGS)
31 endif
What's $(NULL), what does it do ? And the three argument $(subst
command, with $(COMMA) as the second argument ?
I feel I need to understand that, because in an earlier step I tried to
insert a -fplugin-arg value with space in my own makefile, substituted
from environment variable, and that miserably failed. Somehow I just
could not find a syntax that reliably worked.
_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis