[PATCH] D107193: [Zorg] Don't delete test-suite source directory every time.

Galina via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 14 22:37:41 PST 2021


gkistanova requested changes to this revision.
gkistanova added a comment.
This revision now requires changes to proceed.

Hello Michael,

Sorry for the late response.

The logic of the cleaning things should work like this:

1. If `clean` build property is set, the source code, the build, and the install directories are removed before corresponding steps.
2. If `clean` build property is NOT set, and if `clean` arg is set, or if `clean_obj` is set, then the build, and the install directories are removed before corresponding steps.

If a builder implements in-tree build, then it should implement "build tree removal" by invoking an appropriate `git clean` command for the case #2, and do nothing for the case #1, since the source code directory removal also removes the build directory.

In `OpenMPBuilder.py` `UnifiedTreeBuilder` would take care of this logic for the llvm-project part. So, you just need to implement the described logic for the `testsuite_srcdir`, `sollvevv_srcdir` and `testsuite_builddir` respectively.

I do not see this in this patch. What am I missing?

`PollyBuilder.py` does implement this logic for the llvm-project part as well. The only thing that needs a fix is the test suite. That part should support the cleaning for both - the test suite source code directory and the test suite build directory.  Cleaning the test suite build directory seems missing in your patch.

If you think the naming `cleanBuildRequestedByProperty` and `cleanBuildRequested` is not so good and would like to propose better names, that's fine. Please make it a separate NFC patch for review.

> UnifiedTreeBuider.getLLVMBuildFactoryAndPrepareForSourcecodeSteps ignores its cleanBuildRequested parameter and instead always uses

Only for removing the source code directory. It does use `cleanBuildRequested` to figure out if build and install directories should be removed. I described above the logic of cleaning. Please feel free to ask if you have questions.


Repository:
  rZORG LLVM Github Zorg

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107193/new/

https://reviews.llvm.org/D107193



More information about the llvm-commits mailing list