This is an archive of the discontinued LLVM Phabricator instance.

[zorg] Addition of extraLitArgs variable to ClangAndLLDBuilder.py
ClosedPublic

Authored by sqlbyme on Feb 17 2016, 2:30 PM.

Details

Reviewers
gkistanova
Summary

Adding a extraLitArgs variable to be able to pass a list of extra lit args in from the builder definition. Also, did a bit of cleanup and removed an old FIXME which has been hanging out for a while.

Diff Detail

Event Timeline

sqlbyme updated this revision to Diff 48240.Feb 17 2016, 2:30 PM
sqlbyme retitled this revision from to [zorg] Addition of extraLitArgs variable to ClangAndLLDBuilder.py.
sqlbyme updated this object.
sqlbyme added a reviewer: gkistanova.
sqlbyme added a project: Restricted Project.
sqlbyme added a subscriber: llvm-commits.
gkistanova added inline comments.Feb 18 2016, 1:15 PM
zorg/buildbot/builders/ClangAndLLDBuilder.py
111

Maybe just let user define -DLLVM_LIT_ARGS with extraCmakeOptions param instead? With a meaningful default, let's say "-v".
This way it would be clear of how a particular builder is configured.

With the current approach, you may end up having multiple conflicting -DLLVM_LIT_ARGS, one coming from extraCmakeOptions, and the other one coming from extraLitArgs.

The other option is to assert on having -DLLVM_LIT_ARGS in extraCmakeOptions. This is up to you which option to choose.

gkistanova edited edge metadata.Feb 19 2016, 11:15 AM

Looks good with one note about the extraLitArgs usage.

Thanks

Galina

sqlbyme updated this revision to Diff 48539.Feb 19 2016, 11:51 AM
sqlbyme edited edge metadata.
gkistanova added inline comments.Feb 19 2016, 12:33 PM
zorg/buildbot/builders/ClangAndLLDBuilder.py
104

Did you mean checking extraCmakeOptions instead? extraCompilerOptions are C/C++ flags...

However, this assert would not work as you think it is.
You want something similar to this:

assert any(a.startswith('-DLLVM_LIT_ARGS=') for a in extraCmakeOptions, "Please use extraLitArgs for LIT arguments instead of defining them in extraCmakeOptions."
sqlbyme updated this revision to Diff 48548.Feb 19 2016, 2:31 PM
gkistanova accepted this revision.Feb 19 2016, 3:52 PM
gkistanova edited edge metadata.

Committed as r261378 with few small changes.

This revision is now accepted and ready to land.Feb 19 2016, 3:52 PM
sqlbyme closed this revision.Feb 19 2016, 5:34 PM
sqlbyme added inline comments.
zorg/buildbot/builders/ClangAndLLDBuilder.py
104

Yep. I'll fix this and re-submit. Thanks.

111

As "-DLLVM_LIT_ARGS=\"-v\"" was previously defined and may still be relied upon I'll add an assertion.