demos: Build with -fno-lto.

Some versions of Clang do not properly pass include paths to the
assembler when LTO is enabled. That's a problem for the DEMO_EMBED macro
used by the demos, since it relies on .incbin. To make matters even
better, compilation fails, but doesn't return an error code; the
resulting binary is simply broken. Fortunately we don't really care
about LTO for the demos, so we can simply disable it. See also
https://github.com/llvm/llvm-project/issues/112920

Thanks to Giovanni for tracking down some of the pieces of this issue.
This commit is contained in:
Henri Verbeet
2025-05-12 18:46:13 +02:00
parent 3c8fd8a2f2
commit d4032f7d09
Notes: Henri Verbeet 2025-05-14 15:26:43 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1492
2 changed files with 3 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ dnl
dnl This file contains code derived from WINE_TRY_CFLAGS() and is used courtesy of Alexandre Julliard.
dnl
dnl VKD3D_CHECK_CFLAGS(flags)
dnl VKD3D_CHECK_CFLAGS(flags,[action-if-yes,[action-if-no]])
AC_DEFUN([VKD3D_CHECK_CFLAGS],
[AS_VAR_PUSHDEF([vkd3d_cflags], vkd3d_cv_cflags_[[$1]])dnl
AC_CACHE_CHECK([whether the compiler supports $1], vkd3d_cflags,
@@ -12,5 +12,5 @@ AC_DEFUN([VKD3D_CHECK_CFLAGS],
[AS_VAR_SET(vkd3d_cflags, yes)],
[AS_VAR_SET(vkd3d_cflags, no)])
CFLAGS=$vkd3d_cflags_saved])
AS_VAR_IF([vkd3d_cflags], [yes], [VKD3D_CFLAGS="$VKD3D_CFLAGS $1"])dnl
AS_VAR_IF([vkd3d_cflags], [yes], [m4_default([$2], [VKD3D_CFLAGS="$VKD3D_CFLAGS $1"])], [$3])dnl
AS_VAR_POPDEF([vkd3d_cflags])])