[PATCH] D108513: [docs] Update Getting Started with Visual Studio guide

Adrian McCarthy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 24 16:05:19 PDT 2021


amccarth accepted this revision.
amccarth added a comment.

LGTM.



================
Comment at: llvm/docs/GettingStartedVS.rst:55
-<http://www.python.org/>`_. Version 3.6 and newer are known to work. You will
-need `GnuWin32 <http://gnuwin32.sourceforge.net/>`_ tools, too.
 
----------------
aaron.ballman wrote:
> yaron.keren wrote:
> > mstorsjo wrote:
> > > aaron.ballman wrote:
> > > > mstorsjo wrote:
> > > > > amccarth wrote:
> > > > > > aaron.ballman wrote:
> > > > > > > I'm a bit worried about losing this information; I didn't have luck skipping GnuWin32 the last time I tried (about a year ago), so I don't think just Python is sufficient. WDYT?
> > > > > > The git-provided versions of common unix tools have been sufficient for me (except there's no make in git).  The git ones are also newer than the GnuWin32 ones, and a couple of them behave slightly differently.
> > > > > > 
> > > > > > The only reason I still I install GnuWin32 is because lldb tests require make.  That said, I make sure that GnuWin32 comes _after_ git in my PATH.  Otherwise, other things go wrong.  GnuWin32 is old and unmaintained.  I don't think we can expect Windows developers to continue to rely on it.
> > > > > > 
> > > > > > I'm not against mentioning it as a possibility, but I don't think it belongs in the mainline "Getting Started" recommendations.
> > > > > Also FYI, regarding GnuWin32 vs the git unix tools - the llvm lit tests also have a provision where they try to locate the git unix tools and add them to the path, but this isn't hooked up when running other testsuites (like for libcxx). See https://github.com/llvm/llvm-project/blob/main/llvm/utils/lit/lit/llvm/config.py#L29-L35.
> > > > If the git tools are sufficient, that's fantastic news (I've been hoping we can get rid of this insecure and long-unsupported requirement for years)! When I last tried, they weren't sufficient; I recall some Clang lit tests were failing because of missing utilities like `sed`. But if you think they're now sufficient, perhaps we should document that more clearly as a need for the testing system? (Also, perhaps the issue is that Git for Windows that comes with VS 2019 may be different from what you download manually, and if so, that would be useful to tell people if it actually matters to the testing system.)
> > > At least the pre-merge test bot runs without GnuWin32 now, but it manually adds the `c:\Program Files\Git\usr\bin` directory to the path instead. The llvm lit config that I linked does look for a path to something similar via the registry, I guess that doesn't find git bundled with Visual Studio (and I'm not sure if that bundled the same unix utilities in the same way).
> > The Visual Studio installer installs a slightly older git (2.31.1) than the standalone installer from the web site (2.33). Otherwise identical and (unlike cmake) installed into the same install location (`c:\Program Files\Git\`).
> > 
> > The bash utilities installed in `c:\Program Files\Git\usr\bin\` (from either version of Git for Windows) pass regression tests for llvm & clang pass. Nothing besides the documented here is required.
> > 
> > llvm-lit config.py indeed can find Git for Windows utilities even if not on the PATH by looking in the registry. This is a very nice "just works" functionality to share with other llvm projects.
> > 
> > I had not tested projects of LLVM other than llvm and clang - this is the scope of a "Getting Started" page ?
> > I had not tested projects of LLVM other than llvm and clang - this is the scope of a "Getting Started" page ?
> 
> I'd say it's not, but if others want to build a case for why it is, I could be persuaded. Personally, I think the docs are good as-is now.
> The Visual Studio installer installs a slightly older git (2.31.1) than the standalone installer from the web site (2.33).

True.  But the good news is that git will prompt you to update within a day or so.

> I recall some Clang lit tests were failing because of missing utilities like `sed`.

```
$ where sed
C:\Program Files\Git\usr\bin\sed.exe
```

The only missing utility that I'm aware of is `make`, which is necessary for `lldb`'s tests.

I generally agree that projects other than `llvm` and `clang` are out of scope for this page.  It would be nice, however, if additional projects were strictly additive.  That is, if you've gone through these steps and now you also want to build `llvm-xyzzy`, having to install a couple more dependents is fine.  But if you'd have to undo part of your setup and do something else instead, that would be (and has been) annoying.  Right now, I think we're in a good state.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108513



More information about the llvm-commits mailing list