From e653ef6c4e612f14ac948f5800bd85ea4d4dbc63 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 14 Jul 2025 19:20:49 +0200 Subject: [PATCH] stdenvAdapters.keepDebugInfo: add Rust support These are the flags we use in the separateDebugInfo hook, plus disabling optimisations in line with what we do for C. This fixes e.g. enableDebugging amberol. --- pkgs/stdenv/adapters.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index 0a0a40121f39..5c359014ba26 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -295,6 +295,7 @@ rec { dontStrip = true; env = (args.env or { }) // { NIX_CFLAGS_COMPILE = toString (args.env.NIX_CFLAGS_COMPILE or "") + " -ggdb -Og"; + NIX_RUSTFLAGS = toString (args.env.NIX_RUSTFLAGS or "") + " -g -C opt-level=0 -C strip=none"; }; }); });