This functionality already exists within the make infrastructure in the form of several environment variables, but does not exist in the cmake infrastructure at present.
Diff Detail
Event Timeline
This patch has no context, and the code seems to just pass along a configuration option, doesn't it?
Agreed, what is the actual use case? Running with a dynamic tool like valgrind? Adding LD_PRELOAD? Remote test execution? Remotely executing tests that were cross-compiled?
Oh I just realize that this is probably meant for the test-suite lit stuff.
It feels a bit weird to add parameters to main lit that are not used anywhere inside llvm. Do you expect this to be used often or would using something like "lit -DRUN_UNDER=xxx" which already exists be enough?
For the remote running stuff that I just pushed in test-suite r254545 I decided to configure things through lit.site.cfg and have the configuration options in cmake. This works nicely if the way you build things is somewhat tied to how you execute them which is the case for my typical cases where you cross compile to a device and execute remotely there. Maybe your use case is similar?