folly: refine -fpermissive flag

This was added for AArch64 support, but we can use a more targeted
flag for the build failure.
This commit is contained in:
Emily 2024-11-13 13:43:05 +00:00
parent fbdced9bb3
commit ae0425bd9a

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 = ''