diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2022-10-07 14:17:57 +0200 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2022-11-30 17:39:05 +0100 |
commit | d409727ea503d1a5744c01700fdb4d92748ab846 (patch) | |
tree | 0f6a3dfb276d2ac51ac9b2408cf40d8b5f8efaf4 /distro | |
parent | add option to link sbin/kresd to jemalloc (diff) | |
download | knot-resolver-d409727ea503d1a5744c01700fdb4d92748ab846.tar.xz knot-resolver-d409727ea503d1a5744c01700fdb4d92748ab846.zip |
distro/pkg/*: build with jemalloc
Diffstat (limited to 'distro')
-rw-r--r-- | distro/pkg/arch/PKGBUILD | 2 | ||||
-rw-r--r-- | distro/pkg/deb/control | 1 | ||||
-rwxr-xr-x | distro/pkg/deb/rules | 1 | ||||
-rw-r--r-- | distro/pkg/nix/default.nix | 5 | ||||
-rw-r--r-- | distro/pkg/rpm/knot-resolver.spec | 2 |
5 files changed, 9 insertions, 2 deletions
diff --git a/distro/pkg/arch/PKGBUILD b/distro/pkg/arch/PKGBUILD index 967ad7ca..7eea556e 100644 --- a/distro/pkg/arch/PKGBUILD +++ b/distro/pkg/arch/PKGBUILD @@ -20,6 +20,7 @@ depends=( 'systemd' 'libcap-ng' 'libnghttp2' + 'jemalloc' ) makedepends=( 'cmocka' @@ -47,6 +48,7 @@ build() { -D systemd_files=enabled \ -D client=enabled \ -D install_kresd_conf=enabled \ + -D malloc=jemalloc \ -D unit_tests=enabled ninja -C build } diff --git a/distro/pkg/deb/control b/distro/pkg/deb/control index fdf213cc..1f9964d2 100644 --- a/distro/pkg/deb/control +++ b/distro/pkg/deb/control @@ -16,6 +16,7 @@ Build-Depends: libsystemd-dev (>= 227) [linux-any], libcap-ng-dev, libuv1-dev, + libjemalloc-dev, luajit, pkg-config, meson (>= 0.49), diff --git a/distro/pkg/deb/rules b/distro/pkg/deb/rules index 3445b8ce..c5774760 100755 --- a/distro/pkg/deb/rules +++ b/distro/pkg/deb/rules @@ -32,6 +32,7 @@ override_dh_auto_build: -Droot_hints=/usr/share/dns/root.hints \ -Dinstall_kresd_conf=enabled \ -Dunit_tests=enabled \ + -Dmalloc=jemalloc \ -Dc_args="$${CFLAGS}" \ -Dc_link_args="$${LDFLAGS}" ninja -v -C build_deb diff --git a/distro/pkg/nix/default.nix b/distro/pkg/nix/default.nix index af42fa80..16c66d05 100644 --- a/distro/pkg/nix/default.nix +++ b/distro/pkg/nix/default.nix @@ -3,7 +3,7 @@ , runCommand, pkg-config, meson, ninja, makeWrapper # build+runtime deps. , knot-dns, luajitPackages, libuv, gnutls, lmdb -, systemd, libcap_ng, dns-root-data, nghttp2 # optionals, in principle +, jemalloc, systemd, libcap_ng, dns-root-data, nghttp2 # optionals, in principle # test-only deps. , cmocka, which, cacert , extraFeatures ? false /* catch-all if defaults aren't enough */ @@ -56,7 +56,7 @@ unwrapped = stdenv.mkDerivation rec { # http://knot-resolver.readthedocs.io/en/latest/build.html#requirements buildInputs = [ knot-dns lua.lua libuv gnutls lmdb ] ++ optionals stdenv.isLinux [ systemd libcap_ng ] - ++ [ nghttp2 ] + ++ [ jemalloc nghttp2 ] ## optional dependencies; TODO: dnstap ; @@ -64,6 +64,7 @@ unwrapped = stdenv.mkDerivation rec { "-Dkeyfile_default=${dns-root-data}/root.ds" "-Droot_hints=${dns-root-data}/root.hints" "-Dinstall_kresd_conf=disabled" # not really useful; examples are inside share/doc/ + "-Dmalloc=jemalloc" "--default-library=static" # not used by anyone ] ++ optional doInstallCheck "-Dunit_tests=enabled" diff --git a/distro/pkg/rpm/knot-resolver.spec b/distro/pkg/rpm/knot-resolver.spec index 1c6b9e83..0a7e2838 100644 --- a/distro/pkg/rpm/knot-resolver.spec +++ b/distro/pkg/rpm/knot-resolver.spec @@ -48,6 +48,7 @@ BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(libcap-ng) BuildRequires: pkgconfig(libuv) BuildRequires: pkgconfig(luajit) >= 2.0 +BuildRequires: jemalloc-devel Requires: systemd Requires(post): systemd @@ -182,6 +183,7 @@ CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" meson build_rpm \ -Dkeyfile_default="%{_sharedstatedir}/knot-resolver/root.keys" \ -Dinstall_root_keys=enabled \ -Dinstall_kresd_conf=enabled \ + -Dmalloc=jemalloc \ --buildtype=plain \ --prefix="%{_prefix}" \ --sbindir="%{_sbindir}" \ |