[Mesa-dev] Breaks building with llvm-3.6, was: [PATCH 1/1] clover: Fix build after LLVM r313390

Jan Vesely jan.vesely at rutgers.edu
Sat Sep 16 22:30:56 UTC 2017


On Sat, 2017-09-16 at 18:30 +0200, Gert Wollny wrote:
> Am Freitag, den 15.09.2017, 21:41 -0400 schrieb Jan Vesely:
> [...]
> 
> > > > > > a/src/gallium/state_trackers/clover/llvm/compat.hpp
> > > > > > b/src/gallium/state_trackers/clover/llvm/compat.hpp
> > > > > > index b22ecfa6b2..9bca6d82e8 100644
> > > > > > --- a/src/gallium/state_trackers/clover/llvm/compat.hpp
> > > > > > +++ b/src/gallium/state_trackers/clover/llvm/compat.hpp
> > > > > > @@ -198,6 +198,16 @@ namespace clover {
> > > > > >                 f(mod.getError().message());
> > > > > >  #endif
> > > > > >           }
> > > > > > +
> > > > > > +        template<typename T> void
> > > > > > +        set_diagnostic_handler(::llvm::LLVMContext *ctx,
> > > > > > +                               T *diagnostic_handler, void
> > > > > > *data) {
> > > > > > +#if HAVE_LLVM >= 0x0600
> > > > > > +           ctx-
> > > > > > > setDiagnosticHandlerCallBack(diagnostic_handler, data);
> > > > > > 
> > > > > > +#else
> > > > > > +           ctx->setDiagnosticHandler(diagnostic_handler,
> > > > > > data);
> > > > > > +#endif
> > > > > > +        }
> > > > > >        }
> > > > > >     }
> > > > > >  }
> 
> It seems that this breaks building with llvm-3.6 [1]. If this is
> intentional, then the according test environment should be removed from
> .travis.yml.

thanks for reporting this. The attached patch should fix the issue. I'm
setting up travis for my branch, but it's still blowing up on --enable-
omx being deprecated.

regards,
Jan

> 
> Best, 
> Gert 
> 
> [1] https://travis-ci.org/gerddie/mesa/jobs/276283003
> 
> In file included from llvm/codegen/bitcode.cpp:35:0:
> ./llvm/compat.hpp: In function ‘void
> clover::llvm::compat::set_diagnostic_handler(llvm::LLVMContext&, T*,
> void*)’:
> ./llvm/compat.hpp:208:15: error: invalid use of incomplete type ‘class
> llvm::LLVMContext’
> In file included from /usr/lib/llvm-
> 3.6/include/llvm/IR/DerivedTypes.h:21:0,
>                  from /usr/lib/llvm-
> 3.6/include/llvm/IR/DataLayout.h:25,
>                  from /usr/lib/llvm-3.6/include/llvm/IR/Module.h:20,
>                  from ./llvm/codegen.hpp:35,
>                  from llvm/codegen/bitcode.cpp:34:
> /usr/lib/llvm-3.6/include/llvm/IR/Type.h:32:7: error: forward
> declaration of ‘class llvm::LLVMContext’
> 
> 
> 

-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-clover-add-missing-include-to-compat.h.patch
Type: text/x-patch
Size: 944 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170916/2a793808/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170916/2a793808/attachment-0001.sig>


More information about the mesa-dev mailing list