Quoting Chuck Atkins (2018-09-24 12:58:26) > Signed-off-by: Chuck Atkins <chuck.atk...@kitware.com> > CC: <mesa-sta...@lists.freedesktop.org> > CC: Dylan Baker <dy...@pnwbakers.com> > CC: Bruce Cherniak <bruce.chern...@intel.com> > CC: Tim Rowley <timothy.o.row...@intel.com> > --- > meson.build | 37 ++++++++++++++++++++++++------------- > 1 file changed, 24 insertions(+), 13 deletions(-) > > diff --git a/meson.build b/meson.build > index cbf88b5013..a7e03c29dc 100644 > --- a/meson.build > +++ b/meson.build > @@ -1160,27 +1160,38 @@ else > endif > > _llvm = get_option('llvm') > -if _llvm == 'auto' > +if _llvm == 'false' > + dep_llvm = null_dep > + with_llvm = false > +else > + _llvm_req = true > + if _llvm == 'auto' > + _llvm_req = with_amd_vk or with_gallium_radeonsi or with_gallium_swr or > with_gallium_opencl > + endif > dep_llvm = dependency( > 'llvm', > version : _llvm_version, > modules : llvm_modules, > optional_modules : llvm_optional_modules, > - required : with_amd_vk or with_gallium_radeonsi or with_gallium_swr or > with_gallium_opencl, > + required : _llvm_req, > ) > + _llvm_2pass = false
I think you could simplify this: > + if dep_llvm.found() and with_gallium_swr and > dep_llvm.version().version_compare('>= 7') > + _llvm_2pass = true > + llvm_modules += ['ipo', 'objcarcopts'] > + endif > + if _llvm_2pass > + dep_llvm = dependency( > + 'llvm', > + version : _llvm_version, > + modules : llvm_modules, > + optional_modules : llvm_optional_modules, > + required : _llvm_req, > + ) > + endif if dep_llvm.found() and with_gallium_swr and dep_llvm.version().version_compare('>= 7') llvm_modules += ['ipo', 'objcarcopts'] dep_llvm = dependency( 'llvm', version : _llvm_version, modules : llvm_modules, optional_modules : llvm_optional_modules, required : _llvm_req, ) endif with_llvm = dep_llvm.found() Could you also mention this upstream bug: https://github.com/mesonbuild/meson/issues/4253? I also pushed a patch that did away with the duplication between auto and true just before reviewing this :/ Dylan
signature.asc
Description: signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev