[Beignet] [PATCH] GBE: Fix a build error against llvm release version

Meng, Mengmeng mengmeng.meng at intel.com
Tue Feb 3 23:14:34 PST 2015


The patch could fix that issue in my side.

-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Ruiling Song
Sent: Wednesday, February 04, 2015 3:08 PM
To: beignet at lists.freedesktop.org
Cc: Song, Ruiling
Subject: [Beignet] [PATCH] GBE: Fix a build error against llvm release version

The DEBUG macro will try to link llvm::DebugFlag and llvm::isCurrentDebugType() which is absent in release version of LLVM library. So define it to empty.
The problem occurs when building debug version of beignet against the release version of llvm.

Signed-off-by: Ruiling Song <ruiling.song at intel.com>
---
 backend/src/llvm/ExpandLargeIntegers.cpp |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/backend/src/llvm/ExpandLargeIntegers.cpp b/backend/src/llvm/ExpandLargeIntegers.cpp
index cbb2708..5b620fc 100644
--- a/backend/src/llvm/ExpandLargeIntegers.cpp
+++ b/backend/src/llvm/ExpandLargeIntegers.cpp
@@ -105,7 +105,10 @@
 using namespace llvm;
 
 #define DEBUG_TYPE "nacl-expand-ints"
-
+#ifdef DEBUG
+  #undef DEBUG
+  #define DEBUG(...)
+#endif
 // Break instructions up into no larger than 64-bit chunks.
 static const unsigned kChunkBits = 64;
 static const unsigned kChunkBytes = kChunkBits / CHAR_BIT;
--
1.7.10.4

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list