mirror of https://gitlab.freedesktop.org/mesa/mesa
meson: Add an option to specify the WGL gallium megadriver filename
Specifying the name at build time, as opposed to renaming after the build, serves two purposes: 1. The link from Mesa's OpenGL32.dll and (and EGL/GLES) to the megadriver is done by filename. If using these frontends, the megadriver can't be renamed afterwards. And Windows doesn't have very good symlink support, so that's not really an option either. 2. The symbol (PDB) filename is also embedded in the DLL using the build-time expected filename. Renaming can produce odd artifacts while debugging. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7115 Reviewed-by: Bill Kristiansen <billkris@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18239>
This commit is contained in:
parent
b5f4a5285c
commit
b2b5308706
|
@ -163,6 +163,12 @@ option(
|
|||
value : 'disabled',
|
||||
description : 'build gallium "clover" OpenCL frontend.',
|
||||
)
|
||||
option(
|
||||
'gallium-windows-dll-name',
|
||||
type : 'string',
|
||||
value : 'libgallium_wgl',
|
||||
description : 'name of gallium megadriver DLL built for Windows. defaults to libgallium_wgl.dll to match DRI',
|
||||
)
|
||||
option(
|
||||
'opencl-spirv',
|
||||
type : 'boolean',
|
||||
|
|
|
@ -30,8 +30,9 @@ wgl_def = custom_target(
|
|||
'--compiler_id', cc.get_argument_syntax(), '--cpu_family', host_machine.cpu_family()]
|
||||
)
|
||||
|
||||
gallium_wgl_name = get_option('gallium-windows-dll-name')
|
||||
libgallium_wgl = shared_library(
|
||||
'gallium_wgl',
|
||||
gallium_wgl_name,
|
||||
['wgl.c'],
|
||||
vs_module_defs : wgl_def,
|
||||
include_directories : [
|
||||
|
@ -46,7 +47,7 @@ libgallium_wgl = shared_library(
|
|||
driver_d3d12, driver_zink, winsys_d3d12_wgl
|
||||
],
|
||||
link_args : gallium_wgl_link_args,
|
||||
name_prefix : 'lib',
|
||||
name_prefix : '',
|
||||
install : true,
|
||||
)
|
||||
libgallium_wgl_build_dir = meson.current_build_dir()
|
||||
|
|
Loading…
Reference in New Issue