It is easier to test and debug these ad-hoc cleanup cases in a shell script.
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
I couldn't reproduce the original issue that @lev encountered. I tried these steps:
- checked out a fresh copy of rS341824, e.g. just before the commit that upgraded llvm/clang/etc to 7.0.
- ran a full buildworld, using __MAKE_CONF and SRCCONF both set to /dev/null, so everything at its default setting.
- ran svn up -r341825 in the source tree, to get the very next commit.
- ran a full buildworld, again using __MAKE_CONF and SRCCONF set to /dev/null, but also adding -DNO_CLEAN to the make command line.
Result: the second buildworld completed just fine, no errors about any stale dependencies, nor any other errors.
That said, I do agree with moving the stale-cleanup logic into a shell script. However, doesn't it also make sense to move the similar functionality just above the clean_deps.sh invocation in Makefile.inc1 into the shell script too? Or do you want to do that incrementally?
I was also unable to reproduce @lev's issue, so will abandon this review.
However, doesn't it also make sense to move the similar functionality just above the clean_deps.sh invocation in Makefile.inc1 into the shell script too? Or do you want to do that incrementally?
I didn't want to possibly break the existing workarounds, so planned to commit this change and then perhaps have a followup to move the existing ones in. Since it appears we will not need this change I'll probably do it the other way around (create tools/build/clean_deps.sh from the existing hacks) in advance of another change needing this.