mark dynamic jemalloc builds as broken on linux

This commit is contained in:
Benjamin Lee 2024-05-23 20:40:29 -07:00 committed by June 🍓🦴
parent 3d1507e6dd
commit a007338b34
2 changed files with 9 additions and 0 deletions

View file

@ -90,6 +90,8 @@
])
++ scope.main.propagatedBuildInputs
++ scope.main.nativeBuildInputs;
meta.broken = scope.main.meta.broken;
};
in
{

View file

@ -155,4 +155,11 @@ craneLib.buildPackage ( commonAttrs // {
};
meta.mainProgram = commonAttrs.pname;
# Dynamically-linked jemalloc is broken on linux due to link-order problems,
# where the symbols are being resolved to libc malloc/free before jemalloc is
# loaded. This problem does not occur on darwin for unknown reasons.
meta.broken =
stdenv.isLinux &&
!stdenv.hostPlatform.isStatic &&
(featureEnabled "jemalloc");
})