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 ae0425bd9a)
(cherry picked from commit 0e3ffa9a6552a7201e45dbcc403a1cb3474b26b8)
This commit is contained in:
Emily
2024-11-30 15:11:13 +01:00
committed by Vladimír Čunát
parent 012bca60e2
commit c47376bbd1
+9 -4
View File
@@ -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 = ''