This is an archive of the discontinued LLVM Phabricator instance.

Add BOLTBuilder: BOLT custom builder
ClosedPublic

Authored by Amir on Dec 20 2021, 3:46 PM.

Details

Summary

The builder is based on UnifiedTreeBuilder.getCmakeWithNinjaBuildFactory, but adds one extra checkout step
between getLLVMBuildFactoryAndSourcecodeSteps and addCmakeSteps/addNinjaSteps.
Builder checks out binary tests from another repo, currently at https://github.com/rafaelauler/bolt-tests.
The plan is to transfer the repository over to llvm organization in the future.

The configuration is tested with a temporary build master, which points to the current BOLT repo instead of the monorepo.

This diff is a part of BOLT upstreaming:
https://lists.llvm.org/pipermail/llvm-dev/2021-December/154290.html

Diff Detail

Event Timeline

Amir requested review of this revision.Dec 20 2021, 3:46 PM
Amir created this revision.

Thanks, Amir!

The patch looks good with one thing:

zorg/buildbot/builders/BOLTBuilder.py
40

This would remove the source code every time when only obj files removal is requested. Not sure if you want this.

Most likely you want to remove the source code only when clean build property is evaluated as true. Please see the discussion of the similar issue in https://reviews.llvm.org/D107193.

Amir updated this revision to Diff 396755.Dec 30 2021, 10:45 PM

Addressed review suggestions (cleanBuildRequestedByProperty)

Amir marked an inline comment as done.Dec 30 2021, 10:46 PM
gkistanova added inline comments.Jan 1 2022, 8:35 PM
zorg/buildbot/builders/BOLTBuilder.py
49

With doStepIf=cleanBuildRequestedByProperty here your builder would not receive any new commits to the test-suite, unless someone manually requires a clean build. Are you sure this is what you want?

Running git unconditionally here should work fine. It would pull only new commits if any, unless the source code got deleted or something went really bad with the checkout. Should serve the need, I think.

I did a quick check and see some relatively recent commits to the BOLT test suite.

Amir updated this revision to Diff 397792.Jan 5 2022, 11:31 PM

Always checkout bolt-tests repo

Amir marked an inline comment as done.Jan 5 2022, 11:32 PM
Amir added inline comments.
zorg/buildbot/builders/BOLTBuilder.py
49

Thanks for pointing this out! Yes, it makes sense to pull new commits unconditionally.

Amir marked an inline comment as done.Jan 6 2022, 12:28 AM
This revision is now accepted and ready to land.Jan 6 2022, 7:54 AM
Amir added a comment.Jan 6 2022, 12:34 PM

@gkistanova, thank you for the review! Provided there are no objections from other reviewers, can you please land this diff for me? I don't have commit access to LLVM repos yet.

Sure, I commit this for you.

This revision was automatically updated to reflect the committed changes.