-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MSVC support, at long last #149
Conversation
in git-for-windows#2098 I'm not succeeding with getting a clean build from a plain But it does look like progress! |
When using "make MSVC=1" or "make MSVC=1 DEBUG=1" you get a regular GCC-like result with *.exe and friends, just built using MSVC's CL..exe rather than GCC. This also uses "vcpkg" to download and compile from source all of the third-party libraries that we use, since we can't (or don't want to) use the mingw-shipped .libs/.dlls. The net result is an old-fashioned set of .exe's and third-party .dll's. You can then "open project" in VS and give it the name of the "git.exe". (Who knew, right?) Also, you can use "open file" to open any .c source file and set breakpoints. So set a breakpoint (If you get a runtime error about not finding a third-party dll, run |
There is a separate step that can synthesize a .sln/.vcproj (by running the makefile in a dry-run mode and then grinding on the output with perl). You can generate it from the makefile if you want. See the "vcxproj" target in config.mak.uname. IIRC, you can just do "make vcxproj" and watch the fun. Or just checkout the vs/master branch, which is one commit ahead of master and has these But be advised, the .sln/.vcproj files are a synthetic and derivative work, since the makefile |
This comment has been minimized.
This comment has been minimized.
/submit |
Submitted as pull.149.git.gitgitgadget@gmail.com |
The msysGit project (i.e. Git for Windows 1.x' SDK) is safely dead for *years* already. This is probably the reason why nobody caught this typo until Carlo Arenas spotted a copy-edited version of it nearby. It is probably about time to rip out the remainders of msysGit/MSys1 support, but that can safely wait a bit longer, and we can at least fix the typo for now. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Just like the natural line ending for Unix shell scripts consist of a single Line Feed, the natural line ending for (DOS) Batch scripts consists of a Carriage Return followed by a Line Feed. It seems that both Unix shell script interpreters and the interpreter for Batch scripts (`cmd.exe`) are keen on seeing the "right" line endings. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When redirecting stdout/stderr to the same file, we cannot guarantee that stdout will come first. In fact, in this test case, it seems that an MSVC build always prints stderr first. In any case, this test case does not want to verify the *order* but the *presence* of both outputs, so let's test exactly that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This patch series was integrated into pu via git@5bee56e. |
This patch series was integrated into pu via git@e3c9020. |
/submit |
Submitted as pull.149.v3.git.gitgitgadget@gmail.com |
On the Git mailing list, Junio C Hamano wrote (reply to this):
|
This patch series was integrated into pu via git@451e35c. |
This patch series was integrated into pu via git@ea7c658. |
This patch series was integrated into pu via git@4339e25. |
This patch series was integrated into pu via git@aba8f7f. |
This patch series was integrated into pu via git@19a5761. |
This patch series was integrated into next via git@5a16e3d. |
This patch series was integrated into pu via git@3f640d0. |
This patch series was integrated into pu via git@d3278f7. |
This patch series was integrated into pu via git@0ebe136. |
This patch series was integrated into pu via git@1fff726. |
This patch series was integrated into pu via git@8806953. |
This patch series was integrated into pu via git@3008a7c. |
This patch series was integrated into pu via git@88b1075. |
This patch series was integrated into next via git@88b1075. |
This patch series was integrated into master via git@88b1075. |
Closed via 88b1075. |
Philip Oakley and Jeff Hostetler worked quite a bit on getting Git to compile with MS Visual C again, and this patch series is the culmination of those efforts. With these patches, it is as easy as
Note: the patches went through quite the number of iterations. For example, for a long time we targeted Visual Studio 2015, and used NuGet packages for the dependencies (such as OpenSSL, cURL, etc), while the current iteration targets Visual Studio 2017 and uses vcpkg for dependencies. Hopefully I did not forget to remove any remnants of those previous versions.
Please also note that this patch series is part 1 of 3 in a bigger story: the next patch series will add support to build Git in Microsoft Visual Studio, and the third patch series will add Continuous Testing by adding an MSVC build and a corresponding parallelized test job to our Azure Pipeline.
Changes since v2:
Changes since v1:
BASIC_CLFAGS
typo was fixed.t0001
now greps for the tell-tales it wants to be present.cache-tree.c
'sDEBUG
constant, now alsobuiltin/blame.c
's is renamed.SANE_TOOL_PATH
, and the support for the compile time flag to enable CrtDbg's detailed heap diagnostics.vcxproj
target has been dropped; The corresponding change is slated for a future patch series.SIGINT
case label was removed, and an adjacent comment was moved so that its indentation no longer looks strange.Cc: Carlo Arenas carenas@gmail.com, Eric Sunshine sunshine@sunshineco.com, Johannes Sixt j6t@kdbg.org