On 04/16/2010 02:01 PM, Jean-Marc Desperrier wrote:
- .macros file generation :
You say : hijack REPORT_BUILD so we can get a .macros file for every
.cpp file compiled.
And there is :
REPORT_BUILD=
'$(if $(filter %.cpp,$<),$(CXX) -dM -E $(COMPILE_CXXFLAGS) $< > $(subst
.o,.macros,$@) 2>&1,@echo $(notdir $<))'

Could you give some info ? Is that black magic introduced inside the
compilation rules of the makefile for each file ? Is each file
preprocessed again after having been compiled ?

Yes this is black magic from the Mozilla build system. 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.

- call graph generation :
The client.mk call defines :
DEHYDRA_PATH='/var/www/html/dxr/tools/gcc-dehydra/dehydra/gcc_treehydra.so'
DEHYDRA_MODULES="${DXRSCRIPTS}/dxr.js"
TREEHYDRA_MODULES="${DXRSCRIPTS}/callgraph/callgraph_static.js"

So actually it's now treehydra and not dehydra that's executed when
compiling the source ?
Treehydra receives the two script and executes both the dehydra and the
treehydra module ?
How does this work exactly ?

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.
_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis

Reply via email to