meson: add option to statically link llvm
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
parent
0abce6d770
commit
b01834b56c
|
@ -1188,6 +1188,8 @@ else
|
||||||
_llvm_version = '>= 3.3.0'
|
_llvm_version = '>= 3.3.0'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
_shared_llvm = get_option('shared-llvm')
|
||||||
|
|
||||||
_llvm = get_option('llvm')
|
_llvm = get_option('llvm')
|
||||||
if _llvm == 'auto'
|
if _llvm == 'auto'
|
||||||
dep_llvm = dependency(
|
dep_llvm = dependency(
|
||||||
|
@ -1196,6 +1198,7 @@ if _llvm == 'auto'
|
||||||
modules : llvm_modules,
|
modules : llvm_modules,
|
||||||
optional_modules : llvm_optional_modules,
|
optional_modules : llvm_optional_modules,
|
||||||
required : with_amd_vk or with_gallium_radeonsi or with_gallium_swr or with_gallium_opencl,
|
required : with_amd_vk or with_gallium_radeonsi or with_gallium_swr or with_gallium_opencl,
|
||||||
|
static : not _shared_llvm
|
||||||
)
|
)
|
||||||
with_llvm = dep_llvm.found()
|
with_llvm = dep_llvm.found()
|
||||||
elif _llvm == 'true'
|
elif _llvm == 'true'
|
||||||
|
@ -1204,6 +1207,7 @@ elif _llvm == 'true'
|
||||||
version : _llvm_version,
|
version : _llvm_version,
|
||||||
modules : llvm_modules,
|
modules : llvm_modules,
|
||||||
optional_modules : llvm_optional_modules,
|
optional_modules : llvm_optional_modules,
|
||||||
|
static : not _shared_llvm,
|
||||||
)
|
)
|
||||||
with_llvm = true
|
with_llvm = true
|
||||||
else
|
else
|
||||||
|
|
|
@ -237,6 +237,12 @@ option(
|
||||||
choices : ['auto', 'true', 'false'],
|
choices : ['auto', 'true', 'false'],
|
||||||
description : 'Build with LLVM support.'
|
description : 'Build with LLVM support.'
|
||||||
)
|
)
|
||||||
|
option(
|
||||||
|
'shared-llvm',
|
||||||
|
type : 'boolean',
|
||||||
|
value : true,
|
||||||
|
description : 'Whether to link llvm shared or statically.'
|
||||||
|
)
|
||||||
option(
|
option(
|
||||||
'valgrind',
|
'valgrind',
|
||||||
type : 'combo',
|
type : 'combo',
|
||||||
|
|
Loading…
Reference in New Issue