Skip to content

Commit

Permalink
Merge pull request #234715 from reckenrode/indent-clang
Browse files Browse the repository at this point in the history
indent: fix build with clang 13 or newer
  • Loading branch information
wegank authored May 29, 2023
2 parents f2f1ec3 + 8fa1407 commit 8dc68e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/development/tools/misc/indent/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ texinfo ];
pkgsBuildBuild = [ buildPackages.stdenv.cc ]; # needed when cross-compiling

env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
"-Wno-implicit-function-declaration";
env.NIX_CFLAGS_COMPILE = toString (
lib.optional stdenv.cc.isClang "-Wno-implicit-function-declaration"
++ lib.optional (stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion stdenv.cc) "13") "-Wno-unused-but-set-variable"
);

hardeningDisable = [ "format" ];

Expand Down

0 comments on commit 8dc68e2

Please sign in to comment.