]> git.lizzy.rs Git - rust.git/commit
Clean tools after building libstd/libtest/librustc.
authorMark Simulacrum <mark.simulacrum@gmail.com>
Thu, 10 Aug 2017 05:12:35 +0000 (10:12 +0500)
committerMark Simulacrum <mark.simulacrum@gmail.com>
Sun, 13 Aug 2017 00:15:43 +0000 (05:15 +0500)
commitcec68167fd3787500194f261e2fcbb14381cd317
treed4cf4fb467870d1e0917b5cadc92ba7e8a06c602
parentfacf5a91c458958de1c11cb9c28e14671af9b6fd
Clean tools after building libstd/libtest/librustc.

This fixes the bug we previously had where we'd build a libtest tool
after building a libstd tool and clear out the libstd tool. Since we
clear out all tools for a given stage on invocations of CleanTools after
lib{std, test, rustc} change, we need to make sure that all tools built
with that stage will be built after the clearing is done.

The fix contained here technically isn't perfect; there is still an edge
case of compiling a libstd tool, then compiling libtest, which will
clear out the libstd tool and it won't ever get rebuilt within that
session of rustbuild. This is where the caching system used today shows
it's problems -- in effect, all tools depend on a global counter of the
stage being cleared out. We can implement such a counter in a future
patch to ensure that tools are rebuilt as needed, but it is deemed
unlikely that it will be required in practice, since most if not all
tools are built after the relevant stage's std/test/rustc are built,
though this is only an opinion and hasn't been verified.
src/bootstrap/compile.rs
src/bootstrap/tool.rs