feat(3p/nix): run clang-tidy during builds

We need to -isystem the libcxx header files in order for clang-tidy to ignore them, as the Nix clang toolchain isn't doing that automatically.

Change-Id: I05b9e9bd522de4c0e2ad543214f6bf6ab66a306b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1359
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
This commit is contained in:
Kane York 2020-07-23 11:55:47 -07:00 committed by kanepyork
parent be98295dc2
commit b8e94002d6
3 changed files with 19 additions and 1 deletions

View file

@ -81,7 +81,6 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation {
mkdir build
cd build
cmake .. \
-DCMAKE_CXX_FLAGS='-Wall -Werror' \
-DCMAKE_INSTALL_PREFIX=$out \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF \
@ -110,6 +109,9 @@ in pkgs.llvmPackages.libcxxStdenv.mkDerivation {
# that they can be included by CMake.
NIX_PROTO_SRCS = protoSrcs;
# Work around broken system header include flags in the cxx toolchain.
LIBCXX_INCLUDE = "${pkgs.llvmPackages.libcxx}/include/c++/v1";
# Install the various symlinks to the Nix binary which users expect
# to exist.
postInstall = ''