This is an archive of the discontinued LLVM Phabricator instance.

[lit] Allow lit.which() to find executables which already have an extension
AcceptedPublic

Authored by zturner on Jul 23 2020, 9:08 AM.

Details

Reviewers
amccarth
akhuang
Summary
LLVM usually specifies executable names without extension so that
they work portably across platforms.  Occasionally, if you're writing
something platform specific, you might want to specify the extension.
For example, you might want to write a test that invokes a batch file.
It's awkward to say `foo` when the file is really called `foo.bat`, but
in this case `lit.util.which()` currently won't find it because it will
construct the filename `foo.bat.bat`.

Diff Detail

Event Timeline

zturner created this revision.Jul 23 2020, 9:08 AM
amccarth accepted this revision.Jul 23 2020, 11:22 AM

This looks fine to me. Is there a lit expert/owner who should also review?

This revision is now accepted and ready to land.Jul 23 2020, 11:22 AM

This looks fine to me. Is there a lit expert/owner who should also review?

Uhh, just me and Reid I think :)

Perhaps now you ;-)

Well then, since Reid is out, this is good to go! :-)