git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Harris <pharris@opentext.com>
To: msysgit@googlegroups.com
Cc: git@vger.kernel.org, ramsay@ramsay1.demon.co.uk,
	jrnieder@gmail.com, Peter Harris <pharris@opentext.com>
Subject: [PATCH 2/2] Modify MSVC wrapper script
Date: Mon,  5 Jul 2010 15:41:37 -0400	[thread overview]
Message-ID: <1278358897-488-2-git-send-email-pharris@opentext.com> (raw)
In-Reply-To: <1278358897-488-1-git-send-email-pharris@opentext.com>

This reduces warnings, and supports additional linker
flags (such as -DEBUG and -MAP)

Signed-off-by: Peter Harris <pharris@opentext.com>
---
 Makefile                        |    1 +
 compat/vcbuild/scripts/clink.pl |    7 ++++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 7134509..d4fd4b0 100644
--- a/Makefile
+++ b/Makefile
@@ -1073,6 +1073,7 @@ ifndef DEBUG
 	AR += -LTCG
 else
 	BASIC_CFLAGS += -Zi -MTd
+	BASIC_LDFLAGS = -DEBUG -MAP
 endif
 	X = .exe
 endif
diff --git a/compat/vcbuild/scripts/clink.pl b/compat/vcbuild/scripts/clink.pl
index 4374771..3f51886 100644
--- a/compat/vcbuild/scripts/clink.pl
+++ b/compat/vcbuild/scripts/clink.pl
@@ -12,10 +12,14 @@
 use strict;
 my @args = ();
 my @cflags = ();
+my @lflags = ();
 my $is_linking = 0;
+my %linkflag = ( '-DEBUG' => 1, '-MAP' => 1 );
 while (@ARGV) {
 	my $arg = shift @ARGV;
-	if ("$arg" =~ /^-[DIMGO]/) {
+	if ($linkflag{$arg}) {
+		push(@lflags, $arg);
+	} elsif ("$arg" =~ /^-[DIMGOWZ]/) {
 		push(@cflags, $arg);
 	} elsif ("$arg" eq "-o") {
 		my $file_out = shift @ARGV;
@@ -44,6 +48,7 @@ while (@ARGV) {
 }
 if ($is_linking) {
 	unshift(@args, "link.exe");
+	push(@args, @lflags);
 } else {
 	unshift(@args, "cl.exe");
 	push(@args, @cflags);
-- 
1.7.1.msysgit.0.4.gea744.MSVC

  reply	other threads:[~2010-07-05 19:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05 19:41 [PATCH 1/2] Fix MSVC build Peter Harris
2010-07-05 19:41 ` Peter Harris [this message]
2010-07-06  5:55 ` Johannes Sixt
2010-07-06 10:12   ` [msysGit] " Johannes Schindelin

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

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

  git send-email \
    --in-reply-to=1278358897-488-2-git-send-email-pharris@opentext.com \
    --to=pharris@opentext.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=msysgit@googlegroups.com \
    --cc=ramsay@ramsay1.demon.co.uk \
    /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.
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 NNTP newsgroup(s).