git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Carlo Arenas <carenas@gmail.com>,
	Eric Sunshine <sunshine@sunshineco.com>,
	Johannes Sixt <j6t@kdbg.org>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v3 00/20] Fix MSVC support, at long last
Date: Tue, 25 Jun 2019 07:49:28 -0700 (PDT)	[thread overview]
Message-ID: <pull.149.v3.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.149.v2.git.gitgitgadget@gmail.com>

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

make MSVC=1

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
[https://docs.microsoft.com/en-us/cpp/vcpkg?view=vs-2017] 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:

 * Fixed the incorrect split-out of the "msvc: update Makefile to allow for
   spaces in the compiler path" patch: I had accidentally reverted that
   change in a later patch in the series.

Changes since v1:

 * The BASIC_CLFAGS typo was fixed.
 * Instead of sorting the output of stdout/stderr, the fixed test case in 
   t0001 now greps for the tell-tales it wants to be present.
 * In addition to cache-tree.c's DEBUG constant, now also builtin/blame.c's
   is renamed.
 * Two changes were factored out of the patch titled "msvc: support building
   Git using MS Visual C++": the support for spaces in SANE_TOOL_PATH, and
   the support for the compile time flag to enable CrtDbg's detailed heap
   diagnostics.
 * A comment about the vcxproj target has been dropped; The corresponding
   change is slated for a future patch series.
 * A left-over "TODO" comment was replaced by stating the final decision
   that only Visual Studio 2015 or later are supported for now.
 * A left-over, commented-out SIGINT case label was removed, and an adjacent
   comment was moved so that its indentation no longer looks strange.

Jeff Hostetler (10):
  cache-tree/blame: avoid reusing the DEBUG constant
  msvc: mark a variable as non-const
  msvc: do not re-declare the timespec struct
  msvc: define ftello()
  msvc: fix detect_msys_tty()
  msvc: update Makefile to allow for spaces in the compiler path
  msvc: support building Git using MS Visual C++
  msvc: add a compile-time flag to allow detailed heap debugging
  msvc: do not pretend to support all signals
  msvc: ignore .dll and incremental compile output

Johannes Schindelin (7):
  mingw: fix a typo in the msysGit-specific section
  Mark .bat files as requiring CR/LF endings
  t0001 (mingw): do not expect a specific order of stdout/stderr
  obstack: fix compiler warning
  mingw: replace mingw_startup() hack
  msvc: fix dependencies of compat/msvc.c
  msvc: avoid debug assertion windows in Debug Mode

Philip Oakley (3):
  msvc: include sigset_t definition
  msvc: define O_ACCMODE
  msvc: add pragmas for common warnings

 .gitattributes                     |   1 +
 .gitignore                         |   5 +
 Makefile                           |  42 +++++++-
 builtin/blame.c                    |   6 +-
 cache-tree.c                       |  14 +--
 compat/mingw.c                     |  99 +++++++++++++----
 compat/mingw.h                     |  24 +++--
 compat/msvc.h                      |  10 ++
 compat/obstack.h                   |   2 +-
 compat/vcbuild/.gitignore          |   3 +
 compat/vcbuild/README              |  39 +++++++
 compat/vcbuild/find_vs_env.bat     | 168 +++++++++++++++++++++++++++++
 compat/vcbuild/scripts/clink.pl    |  41 ++++++-
 compat/vcbuild/vcpkg_copy_dlls.bat |  39 +++++++
 compat/vcbuild/vcpkg_install.bat   |  80 ++++++++++++++
 compat/winansi.c                   |  13 +++
 config.mak.uname                   |  83 +++++++++++---
 git-compat-util.h                  |   9 ++
 t/t0001-init.sh                    |   4 +-
 19 files changed, 620 insertions(+), 62 deletions(-)
 create mode 100644 compat/vcbuild/.gitignore
 create mode 100644 compat/vcbuild/find_vs_env.bat
 create mode 100644 compat/vcbuild/vcpkg_copy_dlls.bat
 create mode 100644 compat/vcbuild/vcpkg_install.bat


base-commit: b697d92f56511e804b8ba20ccbe7bdc85dc66810
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-149%2Fdscho%2Fmsvc-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-149/dscho/msvc-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/149

Range-diff vs v2:

  1:  9d4d6ae7db =  1:  9d4d6ae7db mingw: fix a typo in the msysGit-specific section
  2:  aa27e7f9cb =  2:  aa27e7f9cb Mark .bat files as requiring CR/LF endings
  3:  3e108cfb02 =  3:  3e108cfb02 t0001 (mingw): do not expect a specific order of stdout/stderr
  4:  90ac088d22 =  4:  90ac088d22 cache-tree/blame: avoid reusing the DEBUG constant
  5:  71d85b58b6 =  5:  71d85b58b6 obstack: fix compiler warning
  6:  02f618464f =  6:  02f618464f mingw: replace mingw_startup() hack
  7:  5c383985a1 =  7:  5c383985a1 msvc: fix dependencies of compat/msvc.c
  8:  0a2985dc3c =  8:  0a2985dc3c msvc: include sigset_t definition
  9:  99a2939cc2 =  9:  99a2939cc2 msvc: define O_ACCMODE
 10:  1542e8abe5 = 10:  1542e8abe5 msvc: mark a variable as non-const
 11:  51d73c61d3 = 11:  51d73c61d3 msvc: do not re-declare the timespec struct
 12:  7cfd0fc9b4 = 12:  7cfd0fc9b4 msvc: define ftello()
 13:  f528883d97 = 13:  f528883d97 msvc: fix detect_msys_tty()
 14:  63bf9f1f92 = 14:  63bf9f1f92 msvc: update Makefile to allow for spaces in the compiler path
 15:  245f28ac3b ! 15:  fee0ad048e msvc: support building Git using MS Visual C++
     @@ -43,15 +43,6 @@
       --- a/Makefile
       +++ b/Makefile
      @@
     - 
     - ifdef SANE_TOOL_PATH
     - SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH))
     --BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix "$(SANE_TOOL_PATH_SQ)"|'
     -+BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|'
     - PATH := $(SANE_TOOL_PATH):${PATH}
     - else
     - BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d'
     -@@
       	$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
       	$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
       	$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
 16:  e7888bedbd = 16:  993b6bcd0a msvc: add a compile-time flag to allow detailed heap debugging
 17:  d9668558dd = 17:  42f5b8cee8 msvc: add pragmas for common warnings
 18:  c883f037e0 = 18:  c9a6f6892c msvc: do not pretend to support all signals
 19:  51a20ff2df = 19:  7cb0434fac msvc: avoid debug assertion windows in Debug Mode
 20:  4d44d1fab1 = 20:  4a7ceb2172 msvc: ignore .dll and incremental compile output

-- 
gitgitgadget

  parent reply	other threads:[~2019-06-25 14:49 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18 12:23 [PATCH 00/17] Fix MSVC support, at long last Johannes Schindelin via GitGitGadget
2019-06-18 12:23 ` [PATCH 01/17] Mark .bat files as requiring CR/LF endings Johannes Schindelin via GitGitGadget
2019-06-18 12:23 ` [PATCH 02/17] t0001 (mingw): do not expect a specific order of stdout/stderr Johannes Schindelin via GitGitGadget
2019-06-18 23:12   ` Eric Sunshine
2019-06-19  6:19     ` Johannes Sixt
2019-06-19  6:40       ` Eric Sunshine
2019-06-19 11:26         ` Johannes Schindelin
2019-06-19 11:30           ` Johannes Schindelin
2019-06-19 17:24             ` Johannes Sixt
2019-06-19 20:58               ` Johannes Schindelin
2019-06-18 12:23 ` [PATCH 03/17] cache-tree.c: avoid reusing the DEBUG constant Jeff Hostetler via GitGitGadget
2019-06-18 23:14   ` Eric Sunshine
2019-06-19 11:19     ` Johannes Schindelin
2019-06-19 15:21     ` Junio C Hamano
2019-06-19  0:08   ` Carlo Arenas
2019-06-19 11:17     ` Johannes Schindelin
2019-06-19 17:15       ` Carlo Arenas
2019-06-19 21:03         ` Johannes Schindelin
2019-06-18 12:23 ` [PATCH 04/17] obstack: fix compiler warning Johannes Schindelin via GitGitGadget
2019-06-18 12:23 ` [PATCH 05/17] mingw: replace mingw_startup() hack Johannes Schindelin via GitGitGadget
2019-06-18 12:23 ` [PATCH 06/17] msvc: fix dependencies of compat/msvc.c Johannes Schindelin via GitGitGadget
2019-06-18 12:24 ` [PATCH 07/17] msvc: include sigset_t definition Philip Oakley via GitGitGadget
2019-06-18 12:24 ` [PATCH 08/17] msvc: define O_ACCMODE Philip Oakley via GitGitGadget
2019-06-18 12:24 ` [PATCH 09/17] msvc: mark a variable as non-const Jeff Hostetler via GitGitGadget
2019-06-18 12:24 ` [PATCH 10/17] msvc: do not re-declare the timespec struct Jeff Hostetler via GitGitGadget
2019-06-18 12:24 ` [PATCH 11/17] msvc: define ftello() Jeff Hostetler via GitGitGadget
2019-06-18 12:24 ` [PATCH 12/17] msvc: fix detect_msys_tty() Jeff Hostetler via GitGitGadget
2019-06-18 12:24 ` [PATCH 13/17] msvc: support building Git using MS Visual C++ Jeff Hostetler via GitGitGadget
2019-06-19  0:51   ` Carlo Arenas
2019-06-19 12:50     ` Johannes Schindelin
2019-06-19  8:35   ` Eric Sunshine
2019-06-19 15:11     ` Johannes Schindelin
2019-06-18 12:24 ` [PATCH 14/17] msvc: add pragmas for common warnings Philip Oakley via GitGitGadget
2019-06-18 12:24 ` [PATCH 15/17] msvc: do not pretend to support all signals Jeff Hostetler via GitGitGadget
2019-06-19  4:10   ` Eric Sunshine
2019-06-19 16:49     ` Johannes Schindelin
2019-06-18 12:24 ` [PATCH 16/17] msvc: avoid debug assertion windows in Debug Mode Johannes Schindelin via GitGitGadget
2019-06-18 12:24 ` [PATCH 17/17] msvc: ignore .dll and incremental compile output Jeff Hostetler via GitGitGadget
2019-06-19 21:05 ` [PATCH v2 00/20] Fix MSVC support, at long last Johannes Schindelin via GitGitGadget
2019-06-19 21:05   ` [PATCH v2 01/20] mingw: fix a typo in the msysGit-specific section Johannes Schindelin via GitGitGadget
2019-06-19 21:05   ` [PATCH v2 03/20] t0001 (mingw): do not expect a specific order of stdout/stderr Johannes Schindelin via GitGitGadget
2019-06-19 21:05   ` [PATCH v2 02/20] Mark .bat files as requiring CR/LF endings Johannes Schindelin via GitGitGadget
2019-06-19 21:05   ` [PATCH v2 04/20] cache-tree/blame: avoid reusing the DEBUG constant Jeff Hostetler via GitGitGadget
2019-06-19 21:05   ` [PATCH v2 05/20] obstack: fix compiler warning Johannes Schindelin via GitGitGadget
2019-06-19 21:05   ` [PATCH v2 06/20] mingw: replace mingw_startup() hack Johannes Schindelin via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 07/20] msvc: fix dependencies of compat/msvc.c Johannes Schindelin via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 08/20] msvc: include sigset_t definition Philip Oakley via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 09/20] msvc: define O_ACCMODE Philip Oakley via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 10/20] msvc: mark a variable as non-const Jeff Hostetler via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 11/20] msvc: do not re-declare the timespec struct Jeff Hostetler via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 12/20] msvc: define ftello() Jeff Hostetler via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 13/20] msvc: fix detect_msys_tty() Jeff Hostetler via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 15/20] msvc: support building Git using MS Visual C++ Jeff Hostetler via GitGitGadget
2019-06-21 20:17     ` Johannes Schindelin
2019-06-21 20:45       ` Junio C Hamano
2019-06-19 21:06   ` [PATCH v2 14/20] msvc: update Makefile to allow for spaces in the compiler path Jeff Hostetler via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 16/20] msvc: add a compile-time flag to allow detailed heap debugging Jeff Hostetler via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 17/20] msvc: add pragmas for common warnings Philip Oakley via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 18/20] msvc: do not pretend to support all signals Jeff Hostetler via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 19/20] msvc: avoid debug assertion windows in Debug Mode Johannes Schindelin via GitGitGadget
2019-06-19 21:06   ` [PATCH v2 20/20] msvc: ignore .dll and incremental compile output Jeff Hostetler via GitGitGadget
2019-06-25 14:49   ` Johannes Schindelin via GitGitGadget [this message]
2019-06-25 14:49     ` [PATCH v3 01/20] mingw: fix a typo in the msysGit-specific section Johannes Schindelin via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 02/20] Mark .bat files as requiring CR/LF endings Johannes Schindelin via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 03/20] t0001 (mingw): do not expect a specific order of stdout/stderr Johannes Schindelin via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 04/20] cache-tree/blame: avoid reusing the DEBUG constant Jeff Hostetler via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 05/20] obstack: fix compiler warning Johannes Schindelin via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 06/20] mingw: replace mingw_startup() hack Johannes Schindelin via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 07/20] msvc: fix dependencies of compat/msvc.c Johannes Schindelin via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 08/20] msvc: include sigset_t definition Philip Oakley via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 09/20] msvc: define O_ACCMODE Philip Oakley via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 10/20] msvc: mark a variable as non-const Jeff Hostetler via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 11/20] msvc: do not re-declare the timespec struct Jeff Hostetler via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 13/20] msvc: fix detect_msys_tty() Jeff Hostetler via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 12/20] msvc: define ftello() Jeff Hostetler via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 14/20] msvc: update Makefile to allow for spaces in the compiler path Jeff Hostetler via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 15/20] msvc: support building Git using MS Visual C++ Jeff Hostetler via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 17/20] msvc: add pragmas for common warnings Philip Oakley via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 16/20] msvc: add a compile-time flag to allow detailed heap debugging Jeff Hostetler via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 18/20] msvc: do not pretend to support all signals Jeff Hostetler via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 20/20] msvc: ignore .dll and incremental compile output Jeff Hostetler via GitGitGadget
2019-06-25 14:49     ` [PATCH v3 19/20] msvc: avoid debug assertion windows in Debug Mode Johannes Schindelin via GitGitGadget
2019-06-25 17:50     ` [PATCH v3 00/20] Fix MSVC support, at long last Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.149.v3.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).