[PATCH] Add new lit argument: --exec-feature=FEATURE

Daniel Dunbar daniel at zuster.org
Fri Feb 22 13:53:29 PST 2013


On Fri, Feb 22, 2013 at 1:29 AM, Alexey Samsonov <samsonov at google.com>wrote:

>
>   Hi Daniel,
>
>   Thanks for pointing out at llvm_use_intel_jitevents! I think we can
> benefit from adding a build configuration options that would tell
>   the build system to build LLVM/Clang under ASan/MSan/whatever. Then we
> can setup the correct compile flags, alter llvm-lit options
>   etc.
>
>   Still, I think this is somewhat orthogonal to this patch: we want to
> mark certain tests as "xfailing" under ASan, not "unsupported".
>   It's also good if we have per-test granularity instead of per-directory
> offered by lit.site.cfg (which is far less discoverable).
>
>   Probably, there is another way to achieve the goal - specify "asan" in
> --param flag, but this would also require untrivial
>   changes to lit to make it respect --param values in XFAIL: lines.
>

That's not exactly what I meant. The way I envision things to work is that
--param is used to pass in parameters to the test suite configuration. It's
up to the individual test suite logic to then use those parameters to set
features appropriately.

So, the way to do this just using --param is to require something like
"--param=asan_enabled", and then in LLVM's lit.cfg add:
--
if lit.params.get('asan_enabled'):
  config.available_features.add(...)
--

The goal is that the test suite configuration file has precise control over
the features, and user's can't munge them directly except by using
test-suite ordained parameters.

The reason why I want this division is that in the long term I hope to
allow test suites to declare the options they accept more explicitly, so
that users (and developers) can see precisely what knobs and switches the
test suite honor.

 - Daniel


>   P.S. One more random crazy idea: we can later pull --vg and --vg-leak
> under --exec-feature flag :)
>
> http://llvm-reviews.chandlerc.com/D413
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130222/c4773a42/attachment.html>


More information about the llvm-commits mailing list