Skip to content

util: Turn -DWINDOWS_NO_FUTEX to be pre_args

Yonggang Luo requested to merge lygstate/mesa:futex-win32-fixes into main

Turn -DWINDOWS_NO_FUTEX to be pre_args for not need add direct dependencies to dep_futex for libraries and executables. So only add dependencies to idep_mesautil is enough.

If -DWINDOWS_NO_FUTEX is not globally available, that would cause /src/util/simple_mtx.h:116: undefined reference to `futex_wait'

This error is raised when

  • compiled with -D min-windows-version=7
  • moved futex_wait from futex.h to futex.c
  • used simple_mtx_t in more codes

Or linkage error: src/compiler/libcompiler.a.p/glsl_types.cpp.obj: in function futex_wake': /../../src/util/futex.h:154: undefined reference to WaitOnAddress' When:

  • compiled with -D min-windows-version=7
  • used simple_mtx_t in more codes

Closes: #7494 (closed) Fixes: c002bbeb ("util: Add a Win32 futex impl")

Signed-off-by: Yonggang Luo luoyonggang@gmail.com

Merge request reports