Mesa (master): clover: Fix build against clang SVN >= r293097
Michel Dänzer
daenzer at kemper.freedesktop.org
Fri Jan 27 00:59:46 UTC 2017
Module: Mesa
Branch: master
Commit: d9f8bae616dd35f170949200d28105ce29e4b64c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9f8bae616dd35f170949200d28105ce29e4b64c
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Thu Jan 26 15:28:12 2017 +0900
clover: Fix build against clang SVN >= r293097
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
---
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 81592ce..906367b 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;
More information about the mesa-commit
mailing list