by senknvd · 4y ago · 0 comments
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. CC=<whatever> bazel buildGood luck trying C++20 with clang.