diff options
author | Martin Storsjö <martin@martin.st> | 2023-12-20 14:39:50 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2024-01-05 13:46:01 +0200 |
commit | 102045028ee57967973ea90acac41eb747d3c601 (patch) | |
tree | e63c0876bce81d1a16d6eeadeca216bd00c47769 | |
parent | cb6b165b169b1d01e1a055922f96c307ced81d79 (diff) | |
download | ffmpeg-102045028ee57967973ea90acac41eb747d3c601.tar.gz |
configure: Disable inline assembly with nonlocal labels with LTO on Clang on Windows
The file libavcodec/x86/mlpdsp_init.c uses inline assembly with
nonlocal labels that are referenced outside of the assembly in C.
This fails to link with LTO when built with Clang when targeting
Windows.
The root cause has been reported upstream at
https://github.com/llvm/llvm-project/issues/76046.
Fixes: https://trac.ffmpeg.org/ticket/10548
Signed-off-by: Martin Storsjö <martin@martin.st>
-rwxr-xr-x | configure | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -7399,6 +7399,16 @@ if [ -n "$lto" ]; then check_cflags $lto check_ldflags $lto $cpuflags disable inline_asm_direct_symbol_refs + if test "$cc_type" = "clang"; then + # Clang's LTO fails on Windows, when there are references outside + # of inline assembly to nonlocal labels defined within inline assembly, + # see https://github.com/llvm/llvm-project/issues/76046. + case $target_os in + mingw32|win32) + disable inline_asm_nonlocal_labels + ;; + esac + fi fi enabled ftrapv && check_cflags -ftrapv |