meson: use a feature option for microsoft-clc
It's less code and makes the configuration easier to fine tune.
Fixes: ff05da7f8d
("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7699>
This commit is contained in:
parent
7ca4a478ad
commit
a5227465c1
13
meson.build
13
meson.build
|
@ -299,15 +299,6 @@ if with_aco_tests and not with_amd_vk
|
|||
error('ACO tests require Radv')
|
||||
endif
|
||||
|
||||
_microsoft_clc = get_option('microsoft-clc')
|
||||
if _microsoft_clc == 'auto'
|
||||
with_microsoft_clc = false
|
||||
else
|
||||
with_microsoft_clc = _microsoft_clc == 'true'
|
||||
endif
|
||||
|
||||
if with_microsoft_clc
|
||||
with_clc = true
|
||||
dep_clang = dependency(
|
||||
'clang',
|
||||
method : 'cmake',
|
||||
|
@ -316,8 +307,10 @@ if with_microsoft_clc
|
|||
'clangBasic', 'clangCodeGen', 'clangDriver', 'clangFrontend', 'clangFrontendTool',
|
||||
'clangHandleCXX', 'clangHandleLLVM',
|
||||
],
|
||||
required : get_option('microsoft-clc'),
|
||||
)
|
||||
endif
|
||||
with_microsoft_clc = dep_clang.found()
|
||||
with_clc = dep_clang.found()
|
||||
|
||||
if host_machine.system() == 'darwin'
|
||||
with_dri_platform = 'apple'
|
||||
|
|
|
@ -268,9 +268,8 @@ option(
|
|||
)
|
||||
option(
|
||||
'microsoft-clc',
|
||||
type : 'combo',
|
||||
type : 'feature',
|
||||
value : 'auto',
|
||||
choices : ['auto', 'true', 'false'],
|
||||
description : 'Build support for the Microsoft CLC to DXIL compiler'
|
||||
)
|
||||
option(
|
||||
|
|
Loading…
Reference in New Issue