summaryrefslogtreecommitdiff
path: root/msvcc.sh
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2018-03-27 11:28:40 -0400
committerAnthony Green <green@moxielogic.com>2018-03-27 11:28:40 -0400
commit2872c460ba8e96416b4f4ee4a0ed183461d8d6c9 (patch)
tree7f4b5aab419ce28dc920f74ccbc4a9cf8773b407 /msvcc.sh
parentb40a386c22a2bd164819b4f398b722357222b7c1 (diff)
downloadlibffi-2872c460ba8e96416b4f4ee4a0ed183461d8d6c9.tar.gz
Fix msvc linking
Diffstat (limited to 'msvcc.sh')
-rwxr-xr-xmsvcc.sh28
1 files changed, 9 insertions, 19 deletions
diff --git a/msvcc.sh b/msvcc.sh
index 5be250a..86de34d 100755
--- a/msvcc.sh
+++ b/msvcc.sh
@@ -171,18 +171,7 @@ do
shift 1
;;
-l*)
- IFS_save="$IFS"
- IFS=\;
- found=
- for d in $libpaths; do
- d=$(cygpath $d)
- if [ -f "$d/lib${1#-l}.a" ]; then
- found="lib${1#-l}.a"
- break;
- fi
- done
- IFS="$IFS_save"
- linkargs="$linkargs ${found:-${1#-l}.lib}"
+ linkargs="$linkargs lib${1#-l}.a}"
shift 1
;;
-W|-Wextra)
@@ -242,14 +231,15 @@ do
esac
done
-# If -Zi is specified, certain optimizations are implicitly disabled
-# by MSVC. Add back those optimizations if this is an optimized build.
-# NOTE: These arguments must come after all others.
-if [ -n "$opt" ]; then
- linkargs="$linkargs -OPT:REF -OPT:ICF -INCREMENTAL:NO"
-fi
-
if [ -n "$linkargs" ]; then
+
+ # If -Zi is specified, certain optimizations are implicitly disabled
+ # by MSVC. Add back those optimizations if this is an optimized build.
+ # NOTE: These arguments must come after all others.
+ if [ -n "$opt" ]; then
+ linkargs="$linkargs -OPT:REF -OPT:ICF -INCREMENTAL:NO"
+ fi
+
args="$args /link $linkargs"
fi