[FFmpeg-cvslog] Merge commit '100fb0ddfda958da70f98feac81f924c02483789'

Clément Bœsch git at videolan.org
Wed Mar 15 13:52:27 EET 2017


ffmpeg | branch: master | Clément Bœsch <cboesch at gopro.com> | Wed Mar 15 12:49:03 2017 +0100| [67e2ba36ec5096a875e377fa1703c535e7eef081] | committer: Clément Bœsch

Merge commit '100fb0ddfda958da70f98feac81f924c02483789'

* commit '100fb0ddfda958da70f98feac81f924c02483789':
  configure: Allow detecting and using LLVM lld-link as linker for windows

Merged-by: Clément Bœsch <cboesch at gopro.com>

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

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

diff --git a/configure b/configure
index 93139ba..d486cfd 100755
--- a/configure
+++ b/configure
@@ -4094,6 +4094,18 @@ probe_cc(){
         # with MSVC which enables it by default.
         _cflags='-Qms0 -Qvec- -Qsimd- -GS -fp:precise'
         disable stripping
+    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 -nologo- 2>&1 | grep -q Microsoft; then
         _type=msvc
         _ident=$($_cc 2>&1 | head -n1)


======================================================================

diff --cc configure
index 93139ba,c56ead7..d486cfd
--- a/configure
+++ b/configure
@@@ -4090,29 -3259,21 +4090,41 @@@ probe_cc()
          _ld_path='-libpath:'
          # -Qdiag-error to make icl error when seeing certain unknown arguments
          _flags='-nologo -Qdiag-error:4044,10157'
 -        # -Qvec- -Qsimd- to prevent miscompilation, -GS for consistency
 +        # -Qvec- -Qsimd- to prevent miscompilation, -GS, fp:precise for consistency
          # with MSVC which enables it by default.
 -        _cflags='-Qms0 -Qvec- -Qsimd- -GS'
 +        _cflags='-Qms0 -Qvec- -Qsimd- -GS -fp:precise'
 +        disable stripping
+     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 -nologo- 2>&1 | grep -q Microsoft; then
 +        _type=msvc
 +        _ident=$($_cc 2>&1 | head -n1)
 +        _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'
 +        _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs'
 +        _cflags_speed="-O2"
 +        _cflags_size="-O1"
 +        if $_cc -nologo- 2>&1 | grep -q Linker; then
 +            _ld_o='-out:$@'
 +        else
 +            _ld_o='-Fe$@'
 +        fi
 +        _cc_o='-Fo$@'
 +        _cc_e='-P -Fi$@'
 +        _flags_filter=msvc_flags
 +        _ld_lib='lib%.a'
 +        _ld_path='-libpath:'
 +        _flags='-nologo'
 +        disable stripping
      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