Created attachment 21063 [details] WIP patch for converting all tests to %lli `lit.cfg.py` defines substitutions for both `lli` and `%lli`, and this is confusing, especially since there is no actual difference between these two except that on Windows `%lli` includes an `-mtriple=' flag force-setting ELF object format. There is even a FIXME in `test/lit.cfg.py' about this very thing: > # FIXME: Why do we have both `lli` and `%lli` that do slightly different > things? It seems like the majority of tests could be converted to use one or the other. If all tests can be converted to one substitution, the other one should be removed. If there is a minority of tests that depend on the other substitution, that substitution should be renamed to something special a la `%llc_dwarf` to clearly indicate that it is a special case and not the default. I included a patch that converts everything to `%lli`, but I don't know if it really works because I don't have a Windows machine to test it on.
FWIW: It seems that for most tools shipping with llvm (llc, opt, etc.) we just use the version with a '%' prefix. I think those are listed in the tools.extend list. I recommend putting the patch up on phabricator and subscribing some people that are active on windows to the review.
> we just use the version with a '%' prefix. That should have been: ... the version *without* a '%' prefix
(In reply to Matthias Braun from comment #2) > > we just use the version with a '%' prefix. > > That should have been: ... the version *without* a '%' prefix +1
(In reply to Matthias Braun from comment #2) > > we just use the version with a '%' prefix. > > That should have been: ... the version *without* a '%' prefix That's because there is no '%'-prefixed version of llc, opt, etc. The majority of tests that run lli use `%lli` (~170 vs ~18), and I think it should stay that way if an `-mtriple` flag is required because otherwise (if the flag is attached to `lli` in `lit.cfg.py`) there will be no simple way of setting a different triple for a test run since `-mtriple` can occur at most once, and it may also seem just more confusing to people. (In reply to Matthias Braun from comment #1) > I recommend putting the patch up on phabricator and subscribing some people > that are active on windows to the review. Thank you for advice, but I'm not sure. The WIP patch was just a simple search-and-replace job because on my machine `%lli` and `lli` are the same. Most of work is still to be done, and I can't contribute any of it. If the thinking is that this little issue won't get enough attention from the right people here, would you think posting on llvm-dev will help? If you still think posting this patch on Phabricator is more appropriate I will do it.