mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
meson: Make shared-llvm into a tri-state boolean
Choosing LLVM's link mode is legitimate on UNIX systems, but only static actually really works under Windows. Give shared-llvm a default 'auto' mode which will pick the previous default of true (shared) on UNIX systems, but newly defaulting to false (static) on Windows. Signed-off-by: Daniel Stone <daniels@collabora.com> Suggested-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4555>
This commit is contained in:
parent
0c05d46237
commit
9ecd9463de
2 changed files with 9 additions and 3 deletions
|
|
@ -1401,6 +1401,11 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
_shared_llvm = get_option('shared-llvm')
|
_shared_llvm = get_option('shared-llvm')
|
||||||
|
if _shared_llvm == 'auto'
|
||||||
|
_shared_llvm = (host_machine.system() != 'windows')
|
||||||
|
else
|
||||||
|
_shared_llvm = (_shared_llvm == 'true')
|
||||||
|
endif
|
||||||
_llvm = get_option('llvm')
|
_llvm = get_option('llvm')
|
||||||
|
|
||||||
# The cmake method will never find libllvm.so|dylib; this is fine for windows
|
# The cmake method will never find libllvm.so|dylib; this is fine for windows
|
||||||
|
|
|
||||||
|
|
@ -250,9 +250,10 @@ option(
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'shared-llvm',
|
'shared-llvm',
|
||||||
type : 'boolean',
|
type : 'combo',
|
||||||
value : true,
|
value : 'auto',
|
||||||
description : 'Whether to link llvm shared or statically.'
|
choices : ['auto', 'true', 'false'],
|
||||||
|
description : 'Whether to link LLVM shared or statically.'
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'valgrind',
|
'valgrind',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue