On Fri, 24 Jul 2015, Steve Lhomme wrote:

--
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
moved mslink next to makedef in compat/windows

Most of these comments belong in the commit message, not in the annotation part (which should use three dashes as separator in order to be stripped by git am, not two), but whoever applies it can fix that.

---
compat/windows/mslink | 9 +++++++++
configure             | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
create mode 100755 compat/windows/mslink

diff --git a/compat/windows/mslink b/compat/windows/mslink
new file mode 100755
index 0000000..76ce873
--- /dev/null
+++ b/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 $?
diff --git a/configure b/configure
index ac2a71d..5ef2e0d 100755
--- a/configure
+++ b/configure
@@ -2633,7 +2633,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"
--
2.4.5

Ok with me if the issue with spaces in the source path was deemed acceptable for now. (People with spaces in the source path can still add --ld=link and have it pick it using $PATH just as before.)

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to