Merge branch 'os/vcbuild'

Fix build procedure for MSVC.

* os/vcbuild:
  contrib/buildsystems: fix expat library name for generated vcxproj
  vcbuild: fix batch file name in README
  vcbuild: fix library name for expat with make MSVC=1
This commit is contained in:
Junio C Hamano 2020-09-09 13:53:09 -07:00
commit ff75e6c99c
4 changed files with 5 additions and 4 deletions

View File

@ -26,8 +26,8 @@ The Steps to Build Git with VS2015 or VS2017 from the command line.
Use ONE of the following forms which should match how you want to Use ONE of the following forms which should match how you want to
compile git.exe. compile git.exe.
$ ./compat/vcbuild/vcpkg_copy_packages.bat debug $ ./compat/vcbuild/vcpkg_copy_dlls.bat debug
$ ./compat/vcbuild/vcpkg_copy_packages.bat release $ ./compat/vcbuild/vcpkg_copy_dlls.bat release
3. Build git using MSVC from an SDK bash window using one of the 3. Build git using MSVC from an SDK bash window using one of the
following commands: following commands:

View File

@ -66,7 +66,7 @@ while (@ARGV) {
} }
push(@args, $lib); push(@args, $lib);
} elsif ("$arg" eq "-lexpat") { } elsif ("$arg" eq "-lexpat") {
push(@args, "expat.lib"); push(@args, "libexpat.lib");
} elsif ("$arg" =~ /^-L/ && "$arg" ne "-LTCG") { } elsif ("$arg" =~ /^-L/ && "$arg" ne "-LTCG") {
$arg =~ s/^-L/-LIBPATH:/; $arg =~ s/^-L/-LIBPATH:/;
push(@lflags, $arg); push(@lflags, $arg);

View File

@ -80,6 +80,7 @@ sub createProject {
$libs_release = join(";", sort(grep /^(?!libgit\.lib|xdiff\/lib\.lib|vcs-svn\/lib\.lib)/, @{$$build_structure{"$prefix${name}_LIBS"}})); $libs_release = join(";", sort(grep /^(?!libgit\.lib|xdiff\/lib\.lib|vcs-svn\/lib\.lib)/, @{$$build_structure{"$prefix${name}_LIBS"}}));
$libs_debug = $libs_release; $libs_debug = $libs_release;
$libs_debug =~ s/zlib\.lib/zlibd\.lib/g; $libs_debug =~ s/zlib\.lib/zlibd\.lib/g;
$libs_debug =~ s/libexpat\.lib/libexpatd\.lib/g;
$libs_debug =~ s/libcurl\.lib/libcurl-d\.lib/g; $libs_debug =~ s/libcurl\.lib/libcurl-d\.lib/g;
} }

View File

@ -349,7 +349,7 @@ sub handleLinkLine
} elsif ("$part" eq "-lcurl") { } elsif ("$part" eq "-lcurl") {
push(@libs, "libcurl.lib"); push(@libs, "libcurl.lib");
} elsif ("$part" eq "-lexpat") { } elsif ("$part" eq "-lexpat") {
push(@libs, "expat.lib"); push(@libs, "libexpat.lib");
} elsif ("$part" eq "-liconv") { } elsif ("$part" eq "-liconv") {
push(@libs, "libiconv.lib"); push(@libs, "libiconv.lib");
} elsif ($part =~ /^[-\/]/) { } elsif ($part =~ /^[-\/]/) {