This is an archive of the discontinued LLVM Phabricator instance.

[zorg] Allow SanitizerBuilder.getSanitizerBuildFactory to accept extra args
ClosedPublic

Authored by Conanap on Mar 15 2021, 10:58 AM.

Details

Summary

There is a need to allow SanitizerBuilder to accept extra args so cmake args can be passed in, in turn allowing us to specify -j with cmake.

Diff Detail

Event Timeline

Conanap created this revision.Mar 15 2021, 10:58 AM
Conanap requested review of this revision.Mar 15 2021, 10:59 AM

gentle ping

There are few comments for the buildbot part.

I didn’t look closely at the scripts part. At a quick glance adding quotation marks in multiple places wouldn’t work smoothly. You might end up with something you didn’t expect.

zorg/buildbot/builders/SanitizerBuilder.py
12

This is cosmetic. Could you move this new parameter up, right after depends_on_projects, please? So we would have env and timeout at the end of the arguments.

37

Did you want to add quotation marks around extra_configure_args value and missed it on the right hand side?

If I get the idea right, you are trying to make sure the extra_configure_args you want to pass through would go as a single argument on each stage. If so, this might be tricky with respect to possible different shells and variations of quotation marks users could specify in extra_configure_args. The same stands for buildbot_selector.py.

How about using something like -- to separate these args from other options which are to be handled in the calling script? Then it should be relatively easy to pass everything down and be transparent to quotation marks stripping by a shell and such. What do you think?

Not a requirement for this path, just some loud thinking.

61

If you make command an array, you would not need to bother with quotation marks. Buildbot will do that for you. Assuming something like -- is used for the pass through params.

Conanap added inline comments.Mar 22 2021, 7:10 AM
zorg/buildbot/builders/SanitizerBuilder.py
37

that's actually a really good idea, thank you! I'll go ahead and do that.

Conanap updated this revision to Diff 332760.Mar 23 2021, 12:45 PM
Conanap marked an inline comment as done.

Changed from using strings to -- to improve portability; changed order of arguments. I'll update the dependent patch to properly reflect the changes made here.

Conanap marked 2 inline comments as done.Mar 23 2021, 12:45 PM
Conanap updated this revision to Diff 333089.Mar 24 2021, 12:26 PM

Updated to align with changes on the patch this depends on.

gkistanova accepted this revision.EditedMar 24 2021, 3:22 PM

Thanks, Albion!
Looks much better now.

This approve is for the buildbot part.

This revision is now accepted and ready to land.Mar 24 2021, 3:22 PM

Hm. This is weird.
I see a wrong patch assigned to this review now.,

The patch I see now adds "-CMAKE_ARGS=-DLLVM_LIT_ARGS=-v -j256" to extra_configure_args. Which is supposedly https://reviews.llvm.org/D98647.

But the patch I have seen before was good. :)

Not sure is this a Phabricator glitch.

Conanap updated this revision to Diff 334236.Mar 30 2021, 11:14 AM

Not sure if there was a glitch but this should be the correct patch again

Oh that is very weird. Let me reupload the differential for records sake. Would you mind taking a quick peak again @gkistanova, just to be on the safe side? Thank you!

This revision was landed with ongoing or failed builds.Apr 6 2021, 11:11 AM
This revision was automatically updated to reflect the committed changes.