git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/5] Makefile: drop builtins from MSVC pdb list

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Aug 17, 2020, 13:20 UTC
Message-ID
<4fc1eaf3-86d8-99de-3a8f-34f49250cee3@jeffhostetler.com>
In-Reply-To
<nycvar.QRO.7.76.6.2008141611490.54@tvgsbejvaqbjf.bet>
On 8/14/20 10:18 AM, Johannes Schindelin wrote:
Show 50 quoted lines
> Hi Peff,
> 
> On Thu, 13 Aug 2020, Jeff King wrote:
> 
>> On Thu, Aug 13, 2020 at 11:04:28AM -0400, Taylor Blau wrote:
>>
>>> On Thu, Aug 13, 2020 at 10:57:19AM -0400, Jeff King wrote:
>>>> Over the years some more programs have become builtins, but nobody
>>>> updated this MSVC-specific section of the file (which specifically says
>>>> that it should not include builtins). Let's bring it up to date.
>>>>
>>>> Signed-off-by: Jeff King <peff@peff.net>
>>>> ---
>>>> Given that nobody has mentioned this, it makes me wonder if anybody is
>>>> even using this part of the Makefile at all these days. Or maybe having
>>>> extra lines here isn't a problem (though it's also missing some entries,
>>>> like one for git-bugreport).
>>>
>>> If having extra entries didn't cause a problem, I would suspect that it
>>> was just that. But that missing entries *also* doesn't cause a problem,
>>> I'd suspect that this section of the Makefile just isn't being used.
>>>
>>> Of course, I'm not using it since I'm not on Windows, but maybe dscho or
>>> Stolee would know if there are legitimate uses. Of course, if there
>>> aren't, I'm favor of getting rid of this section entirely.
>>
>> I cc'd Jeff Hostetler, who added it. :)
>>
>> I'm also pretty not-knowledgeable about Windows, but I think that
>> anybody using MSVC would do so through Visual Studio these days. And
>> that's being covered with recent cmake stuff. Or maybe I'm just
>> clueless. We'll see.
> 
> We have a couple ways to build Git on Windows:
> 
> - the standard way, in a Git for Windows SDK (which is a slightly modified
>    subset of MSYS2). This uses GCC and GNU make and all the things that you
>    might suspect given Git's origins on Linux.
> 
> - the Visual Studio way, after running `make vcxproj` in Git for Windows'
>    SDK. As part of the `vcxproj` target, the non-C parts of Git are
>    generated and committed.
> 
> - the "new" Visual Studio way, after running CMake. The non-C parts are
>    generated through CMake, which is nice because no Git for Windows SDK is
>    required to build this from start to finish.
> 
> - the Visual C way, as championed by Jeff (and which was a prerequisite to
>    working on the `vcxproj` target): in a Git for Windows SDK, use GNU make
>    but replace GCC by MSVC (via the command-line): `make MSVC=1`.

On Windows, I always use either "make" or "make MSVC=1" from a SDK shell window to build and test. This lets me debug in either GDB or Visual Studio directly against the EXE. (That is, without any of the project complications in the debugger or the artificial commits created for the .vcxproj files.) MSVC builds are built from source all the way down (including third-party libraries) thanks to vcpkg.

However, I never install my "make MSVC=1" builds, so I don't care about the PDBs being redistributed. As @dscho said, we added that thinking that we would be able to do MSVC-based releases one day, but that ship sank.

There were some very-early GVFS users who we (personally) gave MSVC- based builds to help get stack traces via internal Watson channels, but that is unnecessary now.

Jeff
Show 22 quoted lines
> 
> While all four methods work, the only one that is regularly used with the
> `make install` command is the first one.
> 
> The location you modified is in the `MSVC` part of `compat.mak.uname`,
> i.e. in the Visual C part.
> 
> We originally had a tentative plan to eventually, maybe, build Git for
> Windows using Visual C by default. However, it turned out that the
> standard malloc in Visual C's runtime was tuned for other workloads than
> Gits, and that nedmalloc performed better, and we originally could not get
> nedmalloc to compile with a modern Visual C, so we stopped that effort.
> 
> That's why you still have support for `make MSVC=1 install`.
> 
> Since it seems not to be too much trouble, I would prefer to keep it
> working for now, even if it is rarely exercised and regressions might
> creep in (like the ones you fixed).
> 
> Thanks,
> Dscho
> 
Previous: Johannes SchindelinNext: Jeff King
Message 10 of 36 in “slimming down installed size”
  1. 0/5 slimming down installed sizeJeff King, Aug 13, 2020
  2. 1/5 Makefile: drop builtins from MSVC pdb listJeff King, Aug 13, 2020
  3. Taylor BlauAug 13, 2020
  4. Jeff KingAug 13, 2020
  5. Derrick StoleeAug 13, 2020
  6. Jeff KingAug 13, 2020
  7. Johannes SchindelinAug 14, 2020
  8. Jeff KingAug 14, 2020
  9. Johannes SchindelinAug 17, 2020
  10. Jeff HostetlerAug 17, 2020
  11. 2/5 make credential helpers builtinsJeff King, Aug 13, 2020
  12. Taylor BlauAug 13, 2020
  13. Jeff KingAug 13, 2020
  14. Junio C HamanoAug 13, 2020
  15. 3/5 make git-bugreport a builtinJeff King, Aug 13, 2020
  16. Derrick StoleeAug 13, 2020
  17. Jeff KingAug 13, 2020
  18. Junio C HamanoAug 13, 2020
  19. Junio C HamanoAug 13, 2020
  20. Jeff KingAug 14, 2020
  21. Johannes SchindelinAug 14, 2020
  22. Jeff KingAug 14, 2020
  23. Junio C HamanoAug 13, 2020
  24. Johannes SchindelinAug 14, 2020
  25. Jeff KingAug 15, 2020
  26. Emily ShafferAug 17, 2020
  27. Junio C HamanoAug 17, 2020
  28. Jeff KingAug 17, 2020
  29. Emily ShafferAug 17, 2020
  30. 4/5 make git-fast-import a builtinJeff King, Aug 13, 2020
  31. 5/5 drop vcs-svn experimentJeff King, Aug 13, 2020
  32. Taylor BlauAug 13, 2020
  33. Jeff KingAug 13, 2020
  34. Johannes SchindelinAug 14, 2020
  35. Jeff KingAug 14, 2020
  36. Taylor BlauAug 13, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.