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

Ruiling Song ruiling.song at intel.com
Tue Feb 3 23:08:19 PST 2015


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



More information about the Beignet mailing list