[FFmpeg-cvslog] configure: Allow detecting and using LLVM lld-link as linker for windows

Martin Storsjö git at videolan.org
Wed Mar 15 13:52:27 EET 2017


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri Jul 22 10:19:52 2016 +0300| [100fb0ddfda958da70f98feac81f924c02483789] | committer: Martin Storsjö

configure: Allow detecting and using LLVM lld-link as linker for windows

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=100fb0ddfda958da70f98feac81f924c02483789
---

 configure | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/configure b/configure
index a41c1e8..c56ead7 100755
--- a/configure
+++ b/configure
@@ -3262,6 +3262,18 @@ probe_cc(){
         # -Qvec- -Qsimd- to prevent miscompilation, -GS for consistency
         # with MSVC which enables it by default.
         _cflags='-Qms0 -Qvec- -Qsimd- -GS'
+    elif $_cc -? 2>/dev/null | grep -q 'LLVM.*Linker'; then
+        # lld can emulate multiple different linkers; in ms link.exe mode,
+        # the -? parameter gives the help output which contains an identifyable
+        # string, while it gives an error in other modes.
+        _type=lld-link
+        # The link.exe mode doesn't have a switch for getting the version,
+        # but we can force it back to gnu mode and get the version from there.
+        _ident=$($_cc -flavor gnu --version)
+        _ld_o='-out:$@'
+        _flags_filter=msvc_flags
+        _ld_lib='lib%.a'
+        _ld_path='-libpath:'
     elif $_cc --version 2>/dev/null | grep -q ^cparser; then
         _type=cparser
         _ident=$($_cc --version | head -n1)



More information about the ffmpeg-cvslog mailing list