aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <cboesch@gopro.com>2017-03-15 12:49:03 +0100
committerClément Bœsch <cboesch@gopro.com>2017-03-15 12:50:04 +0100
commit67e2ba36ec5096a875e377fa1703c535e7eef081 (patch)
treec459efe632d783ddf68f54dea4f91068197fdb7f
parent50d303a66ad03575a1d21ffdb0cfe9aa4de28f89 (diff)
parent100fb0ddfda958da70f98feac81f924c02483789 (diff)
downloadffmpeg-67e2ba36ec5096a875e377fa1703c535e7eef081.tar.gz
Merge commit '100fb0ddfda958da70f98feac81f924c02483789'
* commit '100fb0ddfda958da70f98feac81f924c02483789': configure: Allow detecting and using LLVM lld-link as linker for windows Merged-by: Clément Bœsch <cboesch@gopro.com>
-rwxr-xr-xconfigure12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure b/configure
index 93139ba5b7..d486cfde37 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)