Commit c6dc85d9 authored by Christian Dietrich's avatar Christian Dietrich
Browse files

wrappers: divert between whole project and in-depth wrappers

parent 7dff802e
# These two wrappers are used to gather in-depth information about the
# hashing process. Using them does not yield proper timing information
# about the overall compilation process.
configure_file(clang-hash.in ${PROJECT_BINARY_DIR}/wrappers/clang-hash)
configure_file(clang.in ${PROJECT_BINARY_DIR}/wrappers/clang)
configure_file(clang-hash-collect.in ${PROJECT_BINARY_DIR}/wrappers/clang-hash-collect)
# These wrappers can be used for the actual (re)compilation of whole procects.
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "create_symlink"
"${LLVM_C_COMPILER}" "${CMAKE_CURRENT_BINARY_DIR}/clang-normal"
)
configure_file(clang-hash-stop.in ${PROJECT_BINARY_DIR}/wrappers/clang-hash-stop)
# Symlink compiler wrappers
execute_process(
......
#!/usr/bin/env bash
# Wrapper for clang, that supports (only) fast hash-based
# recompilation.
printf -v ARGS "%q " "$@"
${LLVM_C_COMPILER} -fplugin=${PROJECT_BINARY_DIR}/src/libclang-hash.so \
-Xclang -plugin-arg-clang-hash -Xclang -stop-if-same-hash \
$ARGS
#!/usr/bin/env bash
# This wrapper script should be used, if you want to gather insight
# information about the hashing process. It calls the given clang
# compiler with our plugin and outputs the information on stderr.
printf -v ARGS "%q " "$@"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment