meson: use a feature option for shared-llvm

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
This commit is contained in:
Dylan Baker 2022-12-21 09:26:25 -08:00 committed by Marge Bot
parent c52c2ed0f8
commit 37463bedec
2 changed files with 5 additions and 17 deletions

View File

@ -1617,21 +1617,11 @@ else
_llvm_version = '>= 5.0.0'
endif
_shared_llvm = get_option('shared-llvm')
if _shared_llvm == 'true'
_shared_llvm = 'enabled'
warning('shared_llvm option "true" deprecated, please use "enabled" instead.')
elif _shared_llvm == 'false'
_shared_llvm = 'disabled'
warning('shared_llvm option "false" deprecated, please use "disabled" instead.')
endif
if _shared_llvm == 'auto'
_shared_llvm = (host_machine.system() != 'windows')
else
_shared_llvm = (_shared_llvm == 'enabled')
endif
_llvm = get_option('llvm')
_shared_llvm = get_option('shared-llvm') \
.disable_auto_if(host_machine.system() == 'windows') \
.allowed()
_llvm = get_option('llvm')
dep_llvm = null_dep
with_llvm = false
if _llvm.allowed()

View File

@ -320,9 +320,7 @@ option(
)
option(
'shared-llvm',
type : 'combo',
value : 'auto',
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
type : 'feature',
description : 'Whether to link LLVM shared or statically.'
)
option(