Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 078325c8fd7a76a519a5037b970007dc3a65b524 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash

# This script invokes Microsoft Visual Studio lib.exe from CygWin shell.
# Command line options:
#  -m<machine> i386 or x86_64

. `dirname $0`/mcc-env

machine=

while getopts m: name
do
    case $name in
    m)
        machine="$OPTARG"
        ;;
    *)
        echo Invalid option $name
        exit 2
        ;;
    esac
done

shift `expr $OPTIND - 1`

libfile=$1
shift

export LIB=

if [ "$machine" == "x86_64" ] ; then
  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

lib.exe /nologo /nodefaultlib "/out:$libfile" "$@" || exit 1

Back to the top