This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [cmake] Add LLVM_LIT_ARGS override support for standalone builds
ClosedPublic

Authored by mgorny on Aug 7 2021, 1:09 PM.

Details

Summary

Add a LLVM_LIT_ARGS cached variable in order to make it possible
to override lit arguments when doing standalone builds. Without that,
the user variable is ignored and the default options are always used.

Based on a similar solution found in clang.

Diff Detail

Event Timeline

mgorny requested review of this revision.Aug 7 2021, 1:09 PM
mgorny created this revision.
mgorny added a comment.Aug 9 2021, 1:14 PM

@JDevlieghere, could you also look at this one? I'm not really sure if anybody maintains LLDBStandalone at this point.

@JDevlieghere, could you also look at this one? I'm not really sure if anybody maintains LLDBStandalone at this point.

I think it's pretty much just me these days. I would really like to get rid of it, but it's used downstream by the Swift build.

JDevlieghere accepted this revision.Aug 9 2021, 1:37 PM

A possible alternative would be to export LLVM_LIT_ARGS from the llvm build so that lldb inherits it. I'm pretty much on the fence: on the one hand this doesn't really seems like something that should be exported, but on the other hand it'd be nice to not have to duplicate the option and having to update the default if it changes in llvm.

LGTM in the sense that I have no strong opinion.

This revision is now accepted and ready to land.Aug 9 2021, 1:37 PM
mgorny added a comment.Aug 9 2021, 2:35 PM

Well, I actually find it useful to be able to override lit args per project. Maybe some future solution would be to have it declared as a cache variable from some LLVM CMake file.

Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2021, 2:36 PM