OSDN Git Service

Merge "Give lit a --xunit-xml-output option for saving results in xunit format"
[android-x86/external-llvm.git] / llvm-device-build.mk
index 3811c99..a0691e7 100644 (file)
@@ -1,27 +1,30 @@
+LOCAL_MODULE_TARGET_ARCH := $(LLVM_SUPPORTED_ARCH)
+
+LOCAL_CLANG := true
+
 LOCAL_CFLAGS :=        \
        -D_GNU_SOURCE   \
+       -D__STDC_LIMIT_MACROS   \
+       -D__STDC_CONSTANT_MACROS        \
+       -D__STDC_FORMAT_MACROS  \
        -O2     \
        -fomit-frame-pointer    \
        -Wall   \
        -W      \
        -Wno-unused-parameter   \
        -Wwrite-strings \
+        -Dsprintf=sprintf \
        $(LOCAL_CFLAGS)
 
-ifneq ($(HOST_OS),darwin)
-LOCAL_CFLAGS +=        \
-       -D__STDC_LIMIT_MACROS   \
-       -D__STDC_CONSTANT_MACROS        \
-       -D__STDC_FORMAT_MACROS
-endif
+# ARM64 builds seem to miscompile libLLVM without fno-inline.
+# Test and eventually remove after a future rebase.
+LOCAL_CFLAGS_arm64 += -fno-inline
 
 # The three inline options together reduce libbcc.so almost 1MB.
 # We move them from global build/core/combo/TARGET_linux-arm.mk
 # to here.
 LOCAL_CFLAGS := -DANDROID_TARGET_BUILD \
-               -finline-limit=64 \
                -finline-functions \
-               -fno-inline-functions-called-once \
                $(LOCAL_CFLAGS)
 
 ifeq ($(TARGET_BUILD_VARIANT),eng)
@@ -53,24 +56,27 @@ endif
 LOCAL_CPPFLAGS :=      \
        $(LOCAL_CPPFLAGS)       \
        -Woverloaded-virtual    \
-       -Wno-sign-promo
+       -Wno-sign-promo         \
+       -std=c++11
 
 # Make sure bionic is first so we can include system headers.
 LOCAL_C_INCLUDES :=    \
        bionic \
-       external/stlport/stlport \
+       external/libcxx/include \
        $(LLVM_ROOT_PATH)       \
        $(LLVM_ROOT_PATH)/include       \
        $(LLVM_ROOT_PATH)/device/include        \
        $(LOCAL_C_INCLUDES)
 
+include external/libcxx/libcxx.mk
+
 ###########################################################
 ## Commands for running tblgen to compile a td file
 ###########################################################
 define transform-device-td-to-out
 @mkdir -p $(dir $@)
 @echo "Device TableGen (gen-$(1)): $(TBLGEN_LOCAL_MODULE) <= $<"
-$(hide) $(TBLGEN) \
+$(hide) $(LLVM_TBLGEN) \
        -I $(dir $<)    \
        -I $(LLVM_ROOT_PATH)/include    \
        -I $(LLVM_ROOT_PATH)/device/include     \