Signal 9, SIGKILL, is often a sign of the system OOM (out of memory) handler killing your process. There should be something in dmesg output if that is the case.
High memory usage during linking usually means you've enabled LTO, so you could try without that.
OK, if it works in release, then it's probably the debuginfo that's just too much memory for you to link. That could be avoided by using split-debuginfo, but I don't think that's stable on Linux yet. Another option is to reduce the amount of information, e.g. in Cargo.toml profiles: