From 3bfe0872b9627264482da2bc0a10d3b1b80c2a0a Mon Sep 17 00:00:00 2001 From: Dima Date: Mon, 7 Oct 2019 00:25:04 +0200 Subject: [PATCH] qt5.{qtwebengine, qtwebkit}: fix -Wno-class-memaccess warning for clang With a previous fix for log size issues due to GCC 8 a gcc specific `-W` flag was added that clang does not know, so it spams the logs. --- pkgs/development/libraries/qt-5/modules/qtwebengine.nix | 2 +- pkgs/development/libraries/qt-5/modules/qtwebkit.nix | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index c96aef3f4da5..df444eee2eb5 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -103,7 +103,7 @@ EOF --replace 'libs = [ "sandbox" ]' 'libs = [ "/usr/lib/libsandbox.1.dylib" ]' ''); - NIX_CFLAGS_COMPILE = [ + NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ # with gcc8, -Wclass-memaccess became part of -Wall and this exceeds the logging limit "-Wno-class-memaccess" ] ++ lib.optionals (stdenv.hostPlatform.platform.gcc.arch or "" == "sandybridge") [ diff --git a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix index 78404ddffa87..542afdd55da0 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix @@ -50,13 +50,12 @@ qtModule { export qmakeFlags="$qmakeFlags CONFIG+=silent" ''; - NIX_CFLAGS_COMPILE = - [ + NIX_CFLAGS_COMPILE = [ # with gcc7 this warning blows the log over Hydra's limit "-Wno-expansion-to-defined" - # with gcc8, -Wclass-memaccess became part of -Wall and this too exceeds the logging limit - "-Wno-class-memaccess" ] + # with gcc8, -Wclass-memaccess became part of -Wall and this too exceeds the logging limit + ++ optional stdenv.cc.isGNU "-Wno-class-memaccess" # with clang this warning blows the log over Hydra's limit ++ optional stdenv.isDarwin "-Wno-inconsistent-missing-override" ++ optionals flashplayerFix