Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'agent/bin/mcc')
-rwxr-xr-xagent/bin/mcc15
1 files changed, 14 insertions, 1 deletions
diff --git a/agent/bin/mcc b/agent/bin/mcc
index 79754478..44c41192 100755
--- a/agent/bin/mcc
+++ b/agent/bin/mcc
@@ -10,6 +10,7 @@
# -D<name> macro definition
# -I<dir> include directory
# -p<file> PDB file name
+# -m<machine> i386 or x86_64
. `dirname $0`/mcc-env
@@ -20,9 +21,10 @@ cflag=0
gflag=0
Oflag=0
language=
+machine=
oval=
-while getopts co:D:I:gOp:x: name
+while getopts co:D:I:gOp:x:m: name
do
case $name in
c)
@@ -54,6 +56,9 @@ do
x)
language="$OPTARG"
;;
+ m)
+ machine="$OPTARG"
+ ;;
*)
echo Invalid option $name
exit 2
@@ -97,4 +102,12 @@ else
fi
CFLAGS3="/Oy- /DWIN32 /D_CONSOLE /D_VC80_UPGRADE=0x0600 /D_MBCS /W4"
+if [ "$machine" == "x86_64" ] ; then
+ export LIB=$(cygpath -aw "$VSHOME/VC/lib/amd64")\;$(cygpath -aw "$WINSDK/Lib/x64")
+ export PATH="$VSHOME/VC/bin/x86_amd64:$PATH"
+ if [ "$PROCESSOR_ARCHITECTURE" == "AMD64" -o "$PROCESSOR_ARCHITEW6432" == "AMD64" ] ; then
+ export PATH="$VSHOME/VC/bin/amd64:$PATH"
+ fi
+fi
+
cl.exe /nologo $CFLAGS1 $CFLAGS2 $CFLAGS3 "${cmd[@]}" "$@" || exit 1

Back to the top