Reasonable link helper, good for you to analyze.
Features:
- Works with cmaker for CMake projects.
- Works with libcallpass to show the function call statistics.
python3 main.py <JSON generated by cmaker>or if the CLI is available on PyPi (not yet)
pip install rzlinkhelper
rzlinkhelper <JSON generated by cmaker>-c,--clean: Clean compiling and linking results before building--clean-linking: Clean linking results before building
You can configure options on settings.json of your WORKDIR. Available options:
callpass_library_path: Callpass library (libcallpass.so) pathobject_dir: Destination directorydebug: Debug modeoriginal_cxx_executable: Original CXX executable nameoriginal_cc_executable: Original CC excutable nametargeted_cxx_executable: CXX executable nametargeted_cc_executable: CC executable namellvm_link_executable: LLVM linking executable namepreserve_process: The file name for saving SHA-1 relationship for the sake of debugging. Disable this with an empty string.toposort_verbose_logging_dir: Log topo sort intermediate processes. Disable this with an empty string.
{ "callpass_library_path": "./libcallpass.so", "object_dir": "objects", "debug": false, "original_cxx_executable": "/usr/bin/c++", "original_cc_executable": "/usr/bin/cc", "targeted_cxx_executable": "/usr/bin/clang++", "targeted_cc_executable": "/usr/bin/clang", "llvm_link_executable": "/usr/bin/llvm-link", "preserve_process": "sha1.json", "toposort_verbose_logging_dir": "" }