Skip to content
Commit 59528d9f authored by Austin Seipp's avatar Austin Seipp
Browse files

clang-analyzer: respect $NIX_CFLAGS_COMPILE



When using scan-build, you're often going to want to use it in the
context of a Nix expression with buildInputs, and the default wrapper
scripts will put things like include locations for those inputs
$NIX_CFLAGS_COMPILE. Thus, scan-build also needs to pass them to the
analyzer - while the link flags aren't relevant, the include flags are.

This is because the analyzer executable that gets run by scan-build is
*not* clang-wrapper, but the actual clang executable, so it doesn't
implicitly add such arguments. The build is two-stage - it runs the real
clang wrapper once, and then the analyzer once.

Signed-off-by: default avatarAustin Seipp <aseipp@pobox.com>
parent 27a0d565
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