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.
This commit is contained in:
Alyssa Ross 2025-07-14 19:20:49 +02:00
parent 9807714d69
commit e653ef6c4e
No known key found for this signature in database
GPG Key ID: 5B459184230FF0A2

View File

@ -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";
};
});
});