|
|
|
|
|
by senknvd
1304 days ago
|
|
If you're using a decent build system[1], it's trivial to test your code with Clang, GCC, and more: export CC_LD=lld
CC=clang meson setup -Dbuildtype=debug -Dwarning_level=3 build-debug-clang
CC=gcc meson setup -Dbuildtype=debug -Dwarning_level=3 build-debug-gcc
CC=clang meson setup -Dbuildtype=debugoptimized -Dwarning_level=3 -Db_lundef=false -Db_sanitize=address build-asan
Now you can just ninja -C <name of build folder>
to build any and all of these without affecting your source directory. I usually wrap all the useful configurations in a Makefile-like shell script.[1]: https://mesonbuild.com/ |
|