Skip to content

Commit

Permalink
use a wrapper script to call MS link.exe to avoid mixing with /usr/bi…
Browse files Browse the repository at this point in the history
…n/link.exe

favor link over link.exe in case some wrapper script already exists
fallback to "link" in the path if the one next to cl is not found

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
  • Loading branch information
robUx4 authored and michaelni committed Jul 24, 2015
1 parent daf6bce commit 58ed7b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions compat/windows/mslink
@@ -0,0 +1,9 @@
#!/bin/sh

LINK_EXE_PATH=$(dirname "$(command -v cl)")/link
if [ -x "$LINK_EXE_PATH" ]; then
"$LINK_EXE_PATH" $@
else
link $@
fi
exit $?
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -3183,7 +3183,7 @@ case "$toolchain" in
else
cc_default="c99wrap cl"
fi
ld_default="link"
ld_default="$source_path/compat/windows/mslink"
nm_default="dumpbin -symbols"
ar_default="lib"
target_os_default="win32"
Expand Down

0 comments on commit 58ed7b6

Please sign in to comment.