diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index 95d2486bfbb2..f89fed489f84 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -304,12 +304,13 @@ in buildPythonPackage rec { "-Wno-pass-failed" ] ++ [ "-Wno-unused-command-line-argument" - "-Wno-maybe-uninitialized" "-Wno-uninitialized" "-Wno-array-bounds" - "-Wno-stringop-overflow" "-Wno-free-nonheap-object" "-Wno-unused-result" + ] ++ lib.optionals stdenv.cc.isGNU [ + "-Wno-maybe-uninitialized" + "-Wno-stringop-overflow" ])); nativeBuildInputs = [