]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #30452 - dotdash:24876_take_2, r=alexcrichton
authorManish Goregaokar <manishsmail@gmail.com>
Fri, 18 Dec 2015 08:13:46 +0000 (13:43 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Fri, 18 Dec 2015 14:32:14 +0000 (20:02 +0530)
LLVM doesn't really support reusing the same module to emit more than
one file. One bug this causes is that the IR is invalidated by the stack
coloring pass when emitting the first file, and then the IR verifier
complains by the time we try to emit the second file. Also, we get
different binaries with --emit=asm,link than with just --emit=link. In
some cases leading to segfaults.

Unfortunately, it seems that at this point in time, the most sensible
option to circumvent this problem is to just clone the whole llvm module
for the asm output if we need both, asm and obj file output.

Fixes #24876
Fixes #26235

1  2 
src/librustc_trans/back/write.rs

Simple merge