--emit=asm changes the produced machine code

@rekka FYI, I’ve just hit this behavior too. The difference comes from the fact that —emit=asm forces the number of codegen units to 1.

The performance issue between CG=1 and (CG=n + ThinLTO) seems to be known:
https://github.com/rust-lang/rust/issues/47745

1 Like