diff --git a/meson.build b/meson.build index cb275e7dcc1..6b85c9540e8 100644 --- a/meson.build +++ b/meson.build @@ -1401,6 +1401,11 @@ else endif _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') # The cmake method will never find libllvm.so|dylib; this is fine for windows diff --git a/meson_options.txt b/meson_options.txt index a39596a6f19..a342354acfc 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -250,9 +250,10 @@ option( ) option( 'shared-llvm', - type : 'boolean', - value : true, - description : 'Whether to link llvm shared or statically.' + type : 'combo', + value : 'auto', + choices : ['auto', 'true', 'false'], + description : 'Whether to link LLVM shared or statically.' ) option( 'valgrind',