diff options
-rw-r--r-- | device/include/llvm/Config/AsmParsers.def | 5 | ||||
-rw-r--r-- | device/include/llvm/Config/AsmPrinters.def | 5 | ||||
-rw-r--r-- | device/include/llvm/Config/Disassemblers.def | 5 | ||||
-rw-r--r-- | device/include/llvm/Config/Targets.def | 5 | ||||
-rw-r--r-- | include/llvm/Config/llvm-platform-config.h | 2 | ||||
-rw-r--r-- | include/llvm/Target/TargetLibraryInfo.h | 11 | ||||
-rw-r--r-- | llvm-host-build.mk | 4 | ||||
-rw-r--r-- | shared_llvm.mk | 10 |
8 files changed, 38 insertions, 9 deletions
diff --git a/device/include/llvm/Config/AsmParsers.def b/device/include/llvm/Config/AsmParsers.def index b2cfbe2..a0cdc19 100644 --- a/device/include/llvm/Config/AsmParsers.def +++ b/device/include/llvm/Config/AsmParsers.def @@ -30,6 +30,11 @@ LLVM_ASM_PARSER(Mips) #elif defined(__i386__) || defined(__x86_64__) LLVM_ASM_PARSER(X86) + +#if defined(FORCE_BUILD_ARM) + LLVM_ASM_PARSER(ARM) +#endif + #elif defined(__aarch64__) LLVM_ASM_PARSER(ARM) LLVM_ASM_PARSER(AArch64) diff --git a/device/include/llvm/Config/AsmPrinters.def b/device/include/llvm/Config/AsmPrinters.def index 96e2f56..103c2a5 100644 --- a/device/include/llvm/Config/AsmPrinters.def +++ b/device/include/llvm/Config/AsmPrinters.def @@ -30,6 +30,11 @@ LLVM_ASM_PRINTER(Mips) #elif defined(__i386__) || defined(__x86_64__) LLVM_ASM_PRINTER(X86) + +#if defined(FORCE_BUILD_ARM) + LLVM_ASM_PRINTER(ARM) +#endif + #elif defined(__aarch64__) LLVM_ASM_PRINTER(ARM) LLVM_ASM_PRINTER(AArch64) diff --git a/device/include/llvm/Config/Disassemblers.def b/device/include/llvm/Config/Disassemblers.def index 0761902..2ec382e 100644 --- a/device/include/llvm/Config/Disassemblers.def +++ b/device/include/llvm/Config/Disassemblers.def @@ -30,6 +30,11 @@ LLVM_DISASSEMBLER(Mips) #elif defined(__i386__) || defined(__x86_64__) LLVM_DISASSEMBLER(X86) + +#if defined(FORCE_BUILD_ARM) + LLVM_DISASSEMBLER(ARM) +#endif + #elif defined(__aarch64__) LLVM_DISASSEMBLER(ARM) LLVM_DISASSEMBLER(AArch64) diff --git a/device/include/llvm/Config/Targets.def b/device/include/llvm/Config/Targets.def index 014ef14..1b67f95 100644 --- a/device/include/llvm/Config/Targets.def +++ b/device/include/llvm/Config/Targets.def @@ -29,6 +29,11 @@ LLVM_TARGET(Mips) #elif defined(__i386__) || defined(__x86_64__) LLVM_TARGET(X86) + +#if defined(FORCE_BUILD_ARM) + LLVM_TARGET(ARM) +#endif + #elif defined(__aarch64__) LLVM_TARGET(ARM) LLVM_TARGET(AArch64) diff --git a/include/llvm/Config/llvm-platform-config.h b/include/llvm/Config/llvm-platform-config.h index cd005be..c9e82da 100644 --- a/include/llvm/Config/llvm-platform-config.h +++ b/include/llvm/Config/llvm-platform-config.h @@ -141,7 +141,7 @@ #define HAVE_LIBIMAGEHLP 1 /* Type of 1st arg on ELM Callback */ -#define WIN32_ELMCB_PCSTR PSTR +#define WIN32_ELMCB_PCSTR PCSTR #else /* Linux, Mac OS X, ... Unixish platform */ diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h index d4f9f23..93c9aa3 100644 --- a/include/llvm/Target/TargetLibraryInfo.h +++ b/include/llvm/Target/TargetLibraryInfo.h @@ -13,6 +13,17 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/Pass.h" +// BEGIN ANDROID-SPECIFIC +#ifdef WIN32 +#ifdef fseeko +#undef fseeko +#endif +#ifdef ftello +#undef ftello +#endif +#endif // WIN32 +// END ANDROID-SPECIFIC + namespace llvm { class Triple; diff --git a/llvm-host-build.mk b/llvm-host-build.mk index 4e2898d..b40bcbe 100644 --- a/llvm-host-build.mk +++ b/llvm-host-build.mk @@ -1,9 +1,8 @@ # Windows can't use Clang to build yet ifneq ($(HOST_OS),windows) LOCAL_CLANG := true -endif - include external/libcxx/libcxx.mk +endif LOCAL_CFLAGS += \ -D_GNU_SOURCE \ @@ -48,7 +47,6 @@ LOCAL_C_INCLUDES := \ $(LLVM_ROOT_PATH) \ $(LLVM_ROOT_PATH)/include \ $(LLVM_ROOT_PATH)/host/include \ - external/libcxx/include \ $(LOCAL_C_INCLUDES) LOCAL_IS_HOST_MODULE := true diff --git a/shared_llvm.mk b/shared_llvm.mk index 89084ce..9a679bf 100644 --- a/shared_llvm.mk +++ b/shared_llvm.mk @@ -1,6 +1,3 @@ -# Don't build the library in unbundled branches. -ifeq (,$(TARGET_BUILD_APPS)) - LOCAL_PATH:= $(call my-dir) llvm_pre_static_libraries := \ @@ -126,6 +123,11 @@ LOCAL_WHOLE_STATIC_LIBRARIES_mips64 += $(llvm_mips_static_libraries) LOCAL_WHOLE_STATIC_LIBRARIES_arm64 += $(llvm_aarch64_static_libraries) LOCAL_WHOLE_STATIC_LIBRARIES_arm64 += $(llvm_arm_static_libraries) +ifeq ($(BUILD_ARM_FOR_X86),true) +LOCAL_WHOLE_STATIC_LIBRARIES_x86 += $(llvm_arm_static_libraries) +LOCAL_WHOLE_STATIC_LIBRARIES_x86_64 += $(llvm_arm_static_libraries) +endif + LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_post_static_libraries) #LOCAL_LDLIBS := -ldl -lpthread @@ -135,5 +137,3 @@ include $(LLVM_DEVICE_BUILD_MK) include $(BUILD_SHARED_LIBRARY) endif - -endif # don't build in unbundled branches |