Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
tests/testsuite/lto.rs
Outdated
There was a problem hiding this comment.
I'm not sure this is really necessary, it's a lot of code to do very little. The main thing is that I want to detect builds that don't pass any flags (Lto::ObjectAndBitcode), which is difficult to do with the current infrastructure. I could instead use with_stderr_line_without, or just not bother asserting that condition.
There was a problem hiding this comment.
Nah I think this is fine, it's just tests anyway so I don't think there's much need to be super strict about style and such.
|
@bors: r+ All looks great to me, thanks for all the comments! |
|
📌 Commit 62a61dd has been approved by |
|
☀️ Test successful - checks-azure |
Update cargo 2 commits in 1ec223effbbbf9fddd3453cdcae3a96a967608eb..79c769c3d7b4c2cf6a93781575b7f592ef974255 2020-06-09 20:03:14 +0000 to 2020-06-11 22:13:37 +0000 - Fix failure with missing readme. (rust-lang/cargo#8353) - Some LTO fixes. (rust-lang/cargo#8349)
This reworks the LTO computation a little to address a few issues:
cargo buildin a project with both a lib and bin would not engage the optimization introduced in Don't force rustc to do codegen for LTO builds #8192 where the lib should be compiled with-C linker-plugin-lto(bitcode only). This happened because the old code was starting root units asLto::None. The solution here is to conditionally choose the starting Lto for roots.-C linker-plugin-ltowhich is not valid.lto::between_builds, where the second build the lib is now fresh.libtarget will now support LTO.I scattered some comments throughout, hopefully it's not too difficult to follow.
Closes #8337