Add support for nanos6 with jemalloc

This commit is contained in:
Rodrigo Arias 2020-10-19 18:42:41 +02:00
parent 81d144d716
commit ed8a6416a0
2 changed files with 18 additions and 0 deletions

View File

@ -11,6 +11,8 @@
, extrae
, boost
, autoreconfHook
, enableJemalloc ? false
, jemalloc ? null
}:
with stdenv.lib;
@ -38,6 +40,9 @@ stdenv.mkDerivation rec {
export NANOS6_GIT_BRANCH=${branch}
'';
configureFlags = [] ++
optional enableJemalloc "--with-jemalloc=${jemalloc}";
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
# disable all by default, which includes bindnow.
hardeningDisable = [ "all" ];

View File

@ -116,6 +116,19 @@ let
nanos6Latest = callPackage ./bsc/nanos6/default.nix { };
nanos6Git = callPackage ./bsc/nanos6/git.nix { };
jemalloc = self.jemalloc.overrideAttrs (old:
{
# Custom nanos6 configure options
configureFlags = old.configureFlags ++ [
"--with-jemalloc-prefix=nanos6_je_"
"--enable-stats"
];
});
nanos6Jemalloc = callPackage ./bsc/nanos6/git.nix {
enableJemalloc = true;
};
babeltrace = callPackage ./bsc/babeltrace/default.nix { };
babeltrace2 = callPackage ./bsc/babeltrace2/default.nix { };