OSDN Git Service

enable assertion
authorShih-wei Liao <sliao@google.com>
Tue, 4 May 2010 10:19:48 +0000 (03:19 -0700)
committerShih-wei Liao <sliao@google.com>
Tue, 4 May 2010 10:21:56 +0000 (03:21 -0700)
Change-Id: I1db0884c86ac6744f3c95ae10cefc75e762a79c7

Android.mk
lib/VMCore/LLVMContext.cpp
llvm-device-build.mk
llvm-host-build.mk

index a9a449e..cf684a8 100644 (file)
@@ -1,5 +1,6 @@
 LOCAL_PATH := $(call my-dir)
 LLVM_ROOT_PATH := $(LOCAL_PATH)
+LLVM_ENABLE_ASSERTION := true
 include $(CLEAR_VARS)
 
 # Only use this on the device or emulator.
index 4d61363..27d7774 100644 (file)
@@ -19,6 +19,7 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/SourceMgr.h"
 #include "LLVMContextImpl.h"
+#include <ctype.h>
 using namespace llvm;
 
 static ManagedStatic<LLVMContext> GlobalContext;
index 6e008ca..774d051 100644 (file)
@@ -1,5 +1,4 @@
 LOCAL_CFLAGS :=        \
-       -D_DEBUG        \
        -D_GNU_SOURCE   \
        -D__STDC_LIMIT_MACROS   \
        -D__STDC_CONSTANT_MACROS        \
@@ -12,6 +11,13 @@ LOCAL_CFLAGS :=      \
        -Wwrite-strings \
        $(LOCAL_CFLAGS)
 
+ifeq ($(LLVM_ENABLE_ASSERTION),true)
+LOCAL_CFLAGS :=        \
+       -D_DEBUG        \
+       -UNDEBUG        \
+       $(LOCAL_CFLAGS)
+endif
+
 ifneq ($(REQUIRES_EH),1)
 LOCAL_CFLAGS +=        -fno-exceptions
 else
index 1424dfe..2af0cc8 100644 (file)
@@ -1,5 +1,4 @@
 LOCAL_CFLAGS :=        \
-       -D_DEBUG        \
        -D_GNU_SOURCE   \
        -D__STDC_LIMIT_MACROS   \
        -D__STDC_CONSTANT_MACROS        \
@@ -11,6 +10,13 @@ LOCAL_CFLAGS :=      \
        -Wwrite-strings \
        $(LOCAL_CFLAGS)
 
+ifeq ($(LLVM_ENABLE_ASSERTION),true)
+LOCAL_CFLAGS :=        \
+       -D_DEBUG        \
+       -UNDEBUG        \
+       $(LOCAL_CFLAGS)
+endif
+
 ifneq ($(REQUIRES_EH),1)
 LOCAL_CFLAGS += -fno-exceptions
 else