This is an archive of the discontinued LLVM Phabricator instance.

Rename LLD lit features for targets from e.g. "x86" -> "x86-registered-target"
Needs ReviewPublic

Authored by sammccall on Feb 20 2018, 1:37 AM.

Details

Reviewers
ruiu
echristo
Summary

This is consistent with LLVM's tests, and so avoids a source of confusion.

It also avoids an ambiguity: does "XFAIL: sparc" mean "fail when sparc is an
enabled target", or "fail when sparc is a substring of the triple"?
The latter meaning is built into lit, and LLVM uses it
e.g. in clang/test/CodeGen/atomic_ops.c.test

(This cropped up when experimenting with using a common lit config to run
llvm/lld tests, which currently seems to be impossible)

Event Timeline

sammccall created this revision.Feb 20 2018, 1:37 AM

Sorry for the huge patch :-) Apart from lit.cfg.py, everything is just mechanical changes to REQUIRES lines.

ruiu added a comment.Feb 20 2018, 9:46 AM

Pardon my ignorance, but what is a difference between x86 and x86-registered-target?

nhaehnle removed a subscriber: nhaehnle.Feb 21 2018, 4:54 AM

Pardon my ignorance, but what is a difference between x86 and x86-registered-target?

These tokens are mostly arbitrary (lit.cfg.py gives them semantics, so it just needs to be in sync with the tests)
x86-registered-target seems preferable because:

  • it's more specific (host or target?)
  • it's what llvm/test uses for this purpose
  • it won't appear as a substring of a triple (XFAIL: x86 matches if the x86 feature is present, but also if lit's default triple is x86-pc-linux-gnu)

But this isn't a big deal, just a small annoyance for people/tools that deal with both sets of tests. Up to you.