From b3cce104ac66f357cb60c4ad14171e54fc3af648 Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Mon, 9 Nov 2020 10:24:13 +0100 Subject: [PATCH] Configure warnings on Nix derivation This way the presence of the flag remains user configurable through the nix_file or nix_file_content attribute. --- nixpkgs/toolchains/cc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixpkgs/toolchains/cc.nix b/nixpkgs/toolchains/cc.nix index fdf68a1b5..f9a441fc9 100644 --- a/nixpkgs/toolchains/cc.nix +++ b/nixpkgs/toolchains/cc.nix @@ -23,7 +23,8 @@ let # Override cc rm -f $out/bin/cc $out/bin/clang $out/bin/clang++ makeWrapper ${stdenv.cc}/bin/cc $out/bin/cc --add-flags \ - "-isystem ${llvmPackages.libcxx}/include/c++/v1 \ + "-Wno-unused-command-line-argument \ + -isystem ${llvmPackages.libcxx}/include/c++/v1 \ -F${CoreFoundation}/Library/Frameworks \ -F${CoreServices}/Library/Frameworks \ -F${Security}/Library/Frameworks \ @@ -148,7 +149,6 @@ in add_compiler_option_if_supported -Wself-assign # Disable problematic warnings. add_compiler_option_if_supported -Wunused-but-set-parameter - add_compiler_option_if_supported -Wno-unused-command-line-argument # has false positives add_compiler_option_if_supported -Wno-free-nonheap-object # Enable coloring even if there's no attached terminal. Bazel removes the