[clang] [Windows] Add git-clang-format wrapper bat file (PR #69228)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 20 12:15:53 PDT 2023


================
@@ -0,0 +1 @@
+py -3 git-clang-format %*
----------------
llvm-beanz wrote:

`py.exe` is the Windows python launcher. It comes with Python for Windows (not msys2 or cygwin where the shebang line would work). It is the Windows way of choosing which python version you want. You need to use this approach because the standard Python for Windows install always installs `python.exe` regardless of version because Windows generally doesn't version binaries.

[1] [Python for Windows docs](https://docs.python.org/3/using/windows.html#launcher)
[2] [Microsoft docs](https://learn.microsoft.com/en-us/windows/python/faqs#what-is-py-exe-)

I'm going to go take a long shower now to try and forget that I learned this much about Windows.

https://github.com/llvm/llvm-project/pull/69228


More information about the cfe-commits mailing list