summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Carlier <[email protected]>2015-10-28 15:47:09 +0100
committerMichel Dänzer <[email protected]>2015-10-29 12:35:37 +0900
commit37402014e80f991169f9e05c1520667ba3930baf (patch)
treeef534a8727947595b06326043fb6a03d1018f4c3
parentd0693d7515efb9a747b7fe1d0a21a1ca4bdf33a0 (diff)
clover: fix building fix clang-3.8
https://bugs.freedesktop.org/show_bug.cgi?id=92705 v2.1: use Linker::Flags::None instead of 0 and emplace_back() Signed-off-by: Laurent Carlier <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index d74b50df45a..3b37f0802b0 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -247,8 +247,12 @@ namespace {
// attribute. This attribute will prevent Clang from creating
// illegal uses of barrier() (e.g. Moving barrier() inside a conditional
// that is no executed by all threads) during its optimizaton passes.
+#if HAVE_LLVM >= 0x0308
+ c.getCodeGenOpts().LinkBitcodeFiles.emplace_back(llvm::Linker::Flags::None,
+ libclc_path);
+#else
c.getCodeGenOpts().LinkBitcodeFile = libclc_path;
-
+#endif
optimization_level = c.getCodeGenOpts().OptimizationLevel;
// Compile the code