WRAPPER_C is a compiler wrapper. It is another Clang's JSON compilation database generator for make-based build systems.
Unlike Bear which uses LD_PRELOAD, wrapper_c exploits the implicit variables CC
and CXX
to intercept the compilation commands from make
and forwards the commands to the compiler.
Usage: ./wrapper_c [OPTION]... -- compiler
OPTION
-h, --help Help
-v, --version Version
-n, --no_exec Don't execute the command for the compiler.
-d, --debug Activate the logging.
- C++ compiler which supports C++ 17
- Meson
- Ninja
git clone https://github.com/adonis0147/wrapper_c
cd wrapper_c
git submodule update --init --progress
meson build --buildtype=release -Dprefix=/path/to/wrapper_c
ninja install -C build
CC="/path/to/wrapper_c -- gcc" CXX="/path/to/wrapper_c -- g++" ./configure
/path/to/wrapper_make
For the sake of convenience, adding the path to the environment variable PATH
is recommended.
CC="/path/to/wrapper_gcc" CXX="/path/to/wrapper_g++" ./configure
/path/to/wrapper_make
/path/to/wrapper_make -j <num_jobs>