Commit aa9d2292 authored by Henrik Gramner's avatar Henrik Gramner Committed by Anton Mitrofanov
Browse files

msvs: Prefer link.exe from the same directory as cl.exe

/usr/bin/link from coreutils may be located before the MSVS linker in $PATH
which causes linking to fail due to using the wrong binary.
parent ca8bd680
......@@ -1243,7 +1243,13 @@ DEPMT="${QPRE}MT"
if [ $compiler_style = MS ]; then
AR="lib -nologo -out:"
LD="link -out:"
[ $compiler = ICL ] && AR="xi$AR" && LD="xi$LD"
if [ $compiler = ICL ]; then
AR="xi$AR"
LD="xi$LD"
else
mslink="$(dirname "$(command -v cl 2>/dev/null)")/link"
[ -x "$mslink" ] && LD="\"$mslink\" -out:"
fi
HAVE_GETOPT_LONG=0
LDFLAGS="-nologo -incremental:no $(cl_ldflags $LDFLAGS)"
LDFLAGSCLI="$(cl_ldflags $LDFLAGSCLI)"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment