[PATCH] D78846: Fix .arclint on Windows

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 10:11:41 PDT 2020


rnk added a comment.

In D78846#2003259 <https://reviews.llvm.org/D78846#2003259>, @Meinersbur wrote:

> 'bash' in my cmd.exe command prompt will run WSL's bash.exe (which is in Window's system directory)
>
> 'bash' in my mingw terminal will run mingw's bash.
>
> Is this intended? 'git' in cmd.exe will run mingw's git. It may not even matter since invoking 'utils/arcanist/clang-format.sh' from cmd.exe didn't even work in any case before.


It's true, I'm just hoping that the right bash is on PATH. I feel bad leaving this here as a stumbling block for someone who uses cmd.exe with arcanist to trip over, but I need to do something for myself in the meantime.

In D78846#2005817 <https://reviews.llvm.org/D78846#2005817>, @scott.linder wrote:

> I don't have a way to test this, but it seems like an OK change to me, modulo the fact that I don't know the effect of the weirdness @Meinersbur brings up.
>
> Does git really depend on bash, or just "POSIX sh"? We could instead change the script to invoke /bin/sh and audit it to be POSIX.


Yes, if you install git for Windows, it contains bash. There's no package manager, so it's not exactly a dependency.

> I think we should really just rewrite it in Python, which I intended to do but haven't had a chance to yet.

I agree, a Python port would work best in the long run, and would address the cmd.exe issues @Meinsersbur raised.

Thanks for looking at this, I'll land it soon.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78846/new/

https://reviews.llvm.org/D78846





More information about the llvm-commits mailing list