From 079b7a006c021a2a378400fe286d1a49830bca46 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Thu, 28 Aug 2025 12:09:01 +0530 Subject: [PATCH] scx.rustscheds: restore RUSTFLAGS Per https://github.com/sched-ext/scx/blob/059ce35c31c5d7906d2886b0e1c235ef5b6f6da4/meson.build#L347-L349 but linking libbpf is not required, built in rust one should work fine. See https://github.com/NixOS/nixpkgs/pull/437169/commits/8ec509cc139a8d5e665690fac7794ee277233f4a#r2302122465 and https://github.com/sched-ext/scx/pull/2592 --- pkgs/os-specific/linux/scx/scx_rustscheds.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/os-specific/linux/scx/scx_rustscheds.nix b/pkgs/os-specific/linux/scx/scx_rustscheds.nix index edbdcfef4795..c43bfee59861 100644 --- a/pkgs/os-specific/linux/scx/scx_rustscheds.nix +++ b/pkgs/os-specific/linux/scx/scx_rustscheds.nix @@ -30,6 +30,12 @@ rustPlatform.buildRustPackage { env = { BPF_CLANG = lib.getExe llvmPackages.clang; + RUSTFLAGS = lib.concatStringsSep " " [ + "-C relocation-model=pic" + "-C link-args=-lelf" + "-C link-args=-lz" + "-C link-args=-lzstd" + ]; }; hardeningDisable = [