From c47376bbd135d1e30d35dfe81b9dcbc19588df26 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 13 Nov 2024 13:43:05 +0000 Subject: [PATCH] folly: refine `-fpermissive` flag This was added for AArch64 support, but we can use a more targeted flag for the build failure. (cherry picked from commit ae0425bd9a566411f8cd86de17985786f895bcb0) (cherry picked from commit 0e3ffa9a6552a7201e45dbcc403a1cb3474b26b8) --- pkgs/by-name/fo/folly/package.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/fo/folly/package.nix b/pkgs/by-name/fo/folly/package.nix index 050cbf86bcb3..626dd800ce91 100644 --- a/pkgs/by-name/fo/folly/package.nix +++ b/pkgs/by-name/fo/folly/package.nix @@ -99,10 +99,15 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" (placeholder "dev")) ]; - env.NIX_CFLAGS_COMPILE = toString [ - "-DFOLLY_MOBILE=${if follyMobile then "1" else "0"}" - "-fpermissive" - ]; + env.NIX_CFLAGS_COMPILE = lib.concatStringsSep " " ( + [ + "-DFOLLY_MOBILE=${if follyMobile then "1" else "0"}" + ] + ++ lib.optionals (stdenv.cc.isGNU && stdenv.hostPlatform.isAarch64) [ + # /build/source/folly/algorithm/simd/Movemask.h:156:32: error: cannot convert '__Uint64x1_t' to '__Uint8x8_t' + "-flax-vector-conversions" + ] + ); # https://github.com/NixOS/nixpkgs/issues/144170 postPatch = ''