overlays/pkgs-debug: cleanup

This commit is contained in:
Colin 2024-04-13 15:56:53 +00:00
parent a28b7d5616
commit d57aa473ac
1 changed files with 3 additions and 13 deletions

View File

@ -112,9 +112,7 @@ in
"-ggdb"
"-Og"
"-fno-omit-frame-pointer"
] ++ prev.lib.optionals (args.pname or args.name or "" != "glibc") [
"-fstack-protector-strong"
] ++ [
"-Wno-error"
# "-fhardened"
# "-fcf-protection=full" # x86-only
# "-fsanitize=undefined"
@ -122,7 +120,8 @@ in
# "-fsanitize=hwaddress" # undefined reference to __hwasan_init, syntax errors, unable to load `libstdc++.so`
# "-fsanitize=thread"
# "-fsanitize-trap=all"
"-Wno-error"
] ++ prev.lib.optionals (args.pname or args.name or "" != "glibc") [
"-fstack-protector-strong" # doesn't compile for glibc
]);
# ASAN_OPTIONS = "detect_leaks=false";
# MSAN_OPTIONS = "detect_leaks=false";
@ -143,14 +142,5 @@ in
buildInputs = builtins.map final.tryEnableDebuggingInclDependencies (args.buildInputs or []);
});
tryEnableDebuggingInclDependencies = final.tryEnableDebugging' final.enableDebuggingInclDependencies;
# pkgsDebug = prev.extend (final': prev': {
# # packages within this set are compiled so as to make debugging in gdb easier.
# # it's a best-effort way to preserve debug symbols throughout the dependency chain, but DOESN'T ALWAYS KEEP THEM.
# # TODO: avoid building the compilers/toolchains with debug info -- that's just useless rebuilds
# stdenv = prev'.stdenv.override (old: {
# # based on <repo:nixos/nixpkgs:pkgs/stdenv/adapters.nix
# mkDerivationFromStdenv = stdenv: derivArg: final.enableDebuggingInclDependencies ((old.mkDerivationFromStdenv or (_: prev'.stdenv.mkDerivation)) stdenv derivArg);
# });
# });
pkgsDebug = prev.lib.mapAttrs (_pname: final.tryEnableDebuggingInclDependencies) final;
})