[Mesa-dev] [PATCH] clover: Fix build against clang SVN >= r293097
Francisco Jerez
currojerez at riseup.net
Thu Jan 26 18:01:21 UTC 2017
Michel Dänzer <michel at daenzer.net> writes:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
> ---
>
> Not sure if PropagateAttrs should be set to true or false. Setting it to
> true because clang SVN r293097 does so for CUDA, and there are no piglit
> quick_cl regressions with radeonsi on Kaveri.
>
> src/gallium/state_trackers/clover/llvm/compat.hpp | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/clover/llvm/compat.hpp b/src/gallium/state_trackers/clover/llvm/compat.hpp
> index 81592ce702..906367b314 100644
> --- a/src/gallium/state_trackers/clover/llvm/compat.hpp
> +++ b/src/gallium/state_trackers/clover/llvm/compat.hpp
> @@ -83,7 +83,14 @@ namespace clover {
> inline void
> add_link_bitcode_file(clang::CodeGenOptions &opts,
> const std::string &path) {
> -#if HAVE_LLVM >= 0x0308
> +#if HAVE_LLVM >= 0x0500
> + clang::CodeGenOptions::BitcodeFileToLink F;
> +
> + F.Filename = path;
> + F.PropagateAttrs = true;
> + F.LinkFlags = ::llvm::Linker::Flags::None;
> + opts.LinkBitcodeFiles.emplace_back(F);
> +#elif HAVE_LLVM >= 0x0308
> opts.LinkBitcodeFiles.emplace_back(::llvm::Linker::Flags::None, path);
> #else
> opts.LinkBitcodeFile = path;
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170126/31ffe281/attachment.sig>
More information about the mesa-dev
mailing list