You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
In a manner similar to the scan-build ninja target, it would be great if it was possible to create a target that output a callgraph as a "dot" file.
The current process goes something like this:
Set CC="clang" CPPFLAGS="-emit-llvm" and run your build as usual, until clang is unable to link your files with file not recognized: File format not recognized (the generated .o files are LLVM IR bitcode).
Merge the .o files for your target (a library in this case): llvm-link -o foo *.o
Generate a callgraph.dot file with that: cat foo | opt -dot-callgraph
And then trying using graphviz' dot to generate a callgraph. Or use cat foo | opt -print-callgraph to print a human-readable output, etc.
The text was updated successfully, but these errors were encountered:
In a manner similar to the
scan-buildninja target, it would be great if it was possible to create a target that output a callgraph as a "dot" file.The current process goes something like this:
CC="clang" CPPFLAGS="-emit-llvm"and run your build as usual, until clang is unable to link your files withfile not recognized: File format not recognized(the generated.ofiles are LLVM IR bitcode)..ofiles for your target (a library in this case):llvm-link -o foo *.ocallgraph.dotfile with that:cat foo | opt -dot-callgraphAnd then trying using graphviz'
dotto generate a callgraph. Or usecat foo | opt -print-callgraphto print a human-readable output, etc.The text was updated successfully, but these errors were encountered: