Rust 1.31.1 was fine, but it fails on 1.32.0 through to master (though strangely only if I set --release-channel stable). I already bisected the rust side to commit 71ce4c3007b9, part of Rust #54004. That new debug change is only enabled for LLVM7+, so it makes sense that older LLVMs are unaffected.
https://github.com/rust-lang/rust/pull/54004
I will now try to reproduce with pre-release LLVM8, and if that's working I'll see if I can bisect a possible fix from that side.