mirror of
https://github.com/git/git.git
synced 2026-01-18 14:44:28 +00:00
msvc: update compile helper for VS2015
Support -Z flags ("specify PDB options"), only include -l args on link
commands, and force PDBs to be created.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
This commit is contained in:
committed by
Jameson Miller
parent
5a686f3006
commit
b24f16acb5
@@ -12,10 +12,11 @@
|
||||
use strict;
|
||||
my @args = ();
|
||||
my @cflags = ();
|
||||
my @lflags = ();
|
||||
my $is_linking = 0;
|
||||
while (@ARGV) {
|
||||
my $arg = shift @ARGV;
|
||||
if ("$arg" =~ /^-[DIMGO]/) {
|
||||
if ("$arg" =~ /^-[DIMGOZ]/) {
|
||||
push(@cflags, $arg);
|
||||
} elsif ("$arg" eq "-o") {
|
||||
my $file_out = shift @ARGV;
|
||||
@@ -35,9 +36,11 @@ while (@ARGV) {
|
||||
push(@args, "ssleay32.lib");
|
||||
} elsif ("$arg" eq "-lcurl") {
|
||||
push(@args, "libcurl.lib");
|
||||
} elsif ("$arg" eq "-lexpat") {
|
||||
push(@args, "libexpat.lib");
|
||||
} elsif ("$arg" =~ /^-L/ && "$arg" ne "-LTCG") {
|
||||
$arg =~ s/^-L/-LIBPATH:/;
|
||||
push(@args, $arg);
|
||||
push(@lflags, $arg);
|
||||
} elsif ("$arg" =~ /^-R/) {
|
||||
# eat
|
||||
} else {
|
||||
@@ -45,6 +48,9 @@ while (@ARGV) {
|
||||
}
|
||||
}
|
||||
if ($is_linking) {
|
||||
push(@args, @lflags);
|
||||
# force PDB to be created.
|
||||
push(@args, "-debug");
|
||||
unshift(@args, "link.exe");
|
||||
} else {
|
||||
unshift(@args, "cl.exe");
|
||||
|
||||
Reference in New Issue
Block a user