lavapipe: build "Windows" check should use the host machine, not the platforms option.

`with_platform_windows` depends on the `platforms` option,
and is an inaccurate proxy check for `host_machine.system() == 'windows'`.
The ICD path and shared library name are dependent on the host system,
not whether or not Lavapipe is built with `WIN32` platform support.
In fact Lavapipe can be built with no platforms (`-Dplatforms=`)
if you only need headless (then this check would be incorrect)

fixes: e030ab5163

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29900>
(cherry picked from commit 94379377c4)
This commit is contained in:
Aleksi Sapon 2024-06-27 14:04:38 -04:00 committed by Eric Engestrom
parent 01366d8729
commit e94ab1c0a4
2 changed files with 3 additions and 3 deletions

View file

@ -1034,7 +1034,7 @@
"description": "lavapipe: build \"Windows\" check should use the host machine, not the `platforms` option.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "e030ab51632d1de1859e4683ae0ff260a8d98a14",
"notes": null

View file

@ -16,7 +16,7 @@ libvulkan_lvp = shared_library(
icd_lib_path = join_paths(get_option('prefix'), get_option('libdir'))
icd_file_name = 'libvulkan_lvp.so'
if with_platform_windows
if host_machine.system() == 'windows'
icd_lib_path = import('fs').relative_to(get_option('bindir'), with_vulkan_icd_dir)
icd_file_name = 'vulkan_lvp.dll'
endif
@ -27,7 +27,7 @@ icd_command = [
'--lib-path', join_paths(icd_lib_path, icd_file_name),
'--out', '@OUTPUT@',
]
if with_platform_windows
if host_machine.system() == 'windows'
icd_command += '--use-backslash'
endif