I noticed while browsing through the code that this function: https://github.com/rust-lang/rust/blob/f1f6c1286f24f6f762a9b195ac678b55d20c9a9b/src/librustc_llvm/lib.rs#L2164-L2210 was present in the source tree. Curious as to the cause, I looked up issue #15460, and realized that it had been closed. I imagine that this hack is probably unnecessary now.