From c156bc696311928af01132d159b9e307436779bb Mon Sep 17 00:00:00 2001 From: Shih-wei Liao Date: Mon, 7 Jun 2010 22:05:52 -0700 Subject: Fix llvm.mk and the other 49 mk files Change-Id: I5aa02363c1083297d163a575f5a35c495f950230 --- Android.mk | 6 +++--- clear_tblgen_vars.mk | 5 +++++ lib/Analysis/Android.mk | 5 +++++ lib/Analysis/IPA/Android.mk | 5 +++++ lib/AsmParser/Android.mk | 5 +++++ lib/Bitcode/Reader/Android.mk | 5 +++++ lib/Bitcode/Writer/Android.mk | 5 +++++ lib/CodeGen/Android.mk | 5 +++++ lib/CodeGen/AsmPrinter/Android.mk | 13 +++++++++---- lib/CodeGen/SelectionDAG/Android.mk | 7 ++++++- lib/ExecutionEngine/JIT/Android.mk | 5 +++++ lib/MC/Android.mk | 5 +++++ lib/MC/MCParser/Android.mk | 5 +++++ lib/Support/Android.mk | 5 +++++ lib/System/Android.mk | 5 +++++ lib/Target/ARM/Android.mk | 5 +++++ lib/Target/ARM/AsmParser/Android.mk | 9 +++++++-- lib/Target/ARM/AsmPrinter/Android.mk | 7 ++++++- lib/Target/ARM/Disassembler/Android.mk | 7 ++++++- lib/Target/ARM/TargetInfo/Android.mk | 7 ++++++- lib/Target/Android.mk | 5 +++++ lib/Target/X86/Android.mk | 7 ++++++- lib/Target/X86/AsmParser/Android.mk | 9 +++++++-- lib/Target/X86/AsmPrinter/Android.mk | 7 ++++++- lib/Target/X86/Disassembler/Android.mk | 9 +++++++-- lib/Target/X86/TargetInfo/Android.mk | 7 ++++++- lib/Transforms/IPO/Android.mk | 5 +++++ lib/Transforms/InstCombine/Android.mk | 5 +++++ lib/Transforms/Scalar/Android.mk | 9 +++++++-- lib/Transforms/Utils/Android.mk | 5 +++++ lib/VMCore/Android.mk | 5 +++++ llvm-device-build.mk | 9 +++++++-- llvm-gen-intrinsics.mk | 5 +++++ llvm-host-build.mk | 7 ++++++- llvm-tblgen-rules.mk | 7 ++++++- llvm.mk | 6 +++--- tblgen-rules.mk | 5 +++++ utils/TableGen/Android.mk | 5 +++++ 38 files changed, 209 insertions(+), 29 deletions(-) diff --git a/Android.mk b/Android.mk index 3044936..c3ef28f 100644 --- a/Android.mk +++ b/Android.mk @@ -1,12 +1,12 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + 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. -ifneq ($(TARGET_SIMULATOR),true) - subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \ lib/System \ lib/Support \ diff --git a/clear_tblgen_vars.mk b/clear_tblgen_vars.mk index 6c9623e..802e36d 100644 --- a/clear_tblgen_vars.mk +++ b/clear_tblgen_vars.mk @@ -1,2 +1,7 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + TBLGEN_TABLES := TBLGEN_TD_DIR := + +endif diff --git a/lib/Analysis/Android.mk b/lib/Analysis/Android.mk index 6878b85..e8cca21 100644 --- a/lib/Analysis/Android.mk +++ b/lib/Analysis/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) analysis_SRC_FILES := \ @@ -68,3 +71,5 @@ LOCAL_MODULE:= libLLVMAnalysis include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Analysis/IPA/Android.mk b/lib/Analysis/IPA/Android.mk index 6d15e52..d445a1b 100644 --- a/lib/Analysis/IPA/Android.mk +++ b/lib/Analysis/IPA/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) analysis_ipa_SRC_FILES := \ @@ -29,3 +32,5 @@ LOCAL_MODULE:= libLLVMipa include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/AsmParser/Android.mk b/lib/AsmParser/Android.mk index 548f719..d0d647e 100644 --- a/lib/AsmParser/Android.mk +++ b/lib/AsmParser/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) asm_parser_SRC_FILES := \ @@ -26,3 +29,5 @@ LOCAL_MODULE:= libLLVMAsmParser include $(LOCAL_PATH)/../../llvm-device-build.mk include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Bitcode/Reader/Android.mk b/lib/Bitcode/Reader/Android.mk index 165b0d0..c78b702 100644 --- a/lib/Bitcode/Reader/Android.mk +++ b/lib/Bitcode/Reader/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) bitcode_reader_SRC_FILES := \ @@ -27,3 +30,5 @@ LOCAL_MODULE:= libLLVMBitReader include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Bitcode/Writer/Android.mk b/lib/Bitcode/Writer/Android.mk index 5147c46..a4aac59 100644 --- a/lib/Bitcode/Writer/Android.mk +++ b/lib/Bitcode/Writer/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) # For the host only @@ -15,3 +18,5 @@ LOCAL_MODULE:= libLLVMBitWriter include $(LLVM_HOST_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_HOST_STATIC_LIBRARY) + +endif diff --git a/lib/CodeGen/Android.mk b/lib/CodeGen/Android.mk index d232e55..2ce8aec 100644 --- a/lib/CodeGen/Android.mk +++ b/lib/CodeGen/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) codegen_SRC_FILES := \ @@ -99,3 +102,5 @@ LOCAL_MODULE:= libLLVMCodeGen include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/CodeGen/AsmPrinter/Android.mk b/lib/CodeGen/AsmPrinter/Android.mk index 0063f43..159de2b 100644 --- a/lib/CodeGen/AsmPrinter/Android.mk +++ b/lib/CodeGen/AsmPrinter/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH := $(call my-dir) codegen_asmprinter_SRC_FILES := \ @@ -10,11 +13,11 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := \ AsmPrinter.cpp \ AsmPrinterDwarf.cpp \ - AsmPrinterInlineAsm.cpp \ + AsmPrinterInlineAsm.cpp \ DIE.cpp \ DwarfDebug.cpp \ DwarfException.cpp \ - OcamlGCPrinter.cpp + OcamlGCPrinter.cpp LOCAL_MODULE:= libLLVMAsmPrinter @@ -26,10 +29,12 @@ include $(BUILD_HOST_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_SRC_FILES := \ - AsmPrinter.cpp \ - AsmPrinterInlineAsm.cpp + AsmPrinter.cpp \ + AsmPrinterInlineAsm.cpp LOCAL_MODULE:= libLLVMAsmPrinter include $(LLVM_DEVICE_BUILD_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/CodeGen/SelectionDAG/Android.mk b/lib/CodeGen/SelectionDAG/Android.mk index eb15a18..b3665cf 100644 --- a/lib/CodeGen/SelectionDAG/Android.mk +++ b/lib/CodeGen/SelectionDAG/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) codegen_selectiondag_SRC_FILES := \ @@ -21,7 +24,7 @@ codegen_selectiondag_SRC_FILES := \ SelectionDAGBuilder.cpp \ SelectionDAGISel.cpp \ SelectionDAGPrinter.cpp \ - TargetLowering.cpp + TargetLowering.cpp # For the host # ===================================================== @@ -46,3 +49,5 @@ LOCAL_MODULE:= libLLVMSelectionDAG include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/ExecutionEngine/JIT/Android.mk b/lib/ExecutionEngine/JIT/Android.mk index 1c7e27f..3ce2eb4 100644 --- a/lib/ExecutionEngine/JIT/Android.mk +++ b/lib/ExecutionEngine/JIT/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) # For the host @@ -30,3 +33,5 @@ LOCAL_MODULE:= libLLVMJIT include $(LLVM_DEVICE_BUILD_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/MC/Android.mk b/lib/MC/Android.mk index a2dc85a..34ec0b0 100644 --- a/lib/MC/Android.mk +++ b/lib/MC/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) mc_SRC_FILES := \ @@ -45,3 +48,5 @@ LOCAL_MODULE:= libLLVMMC include $(LLVM_DEVICE_BUILD_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/MC/MCParser/Android.mk b/lib/MC/MCParser/Android.mk index 1335362..9e2d869 100644 --- a/lib/MC/MCParser/Android.mk +++ b/lib/MC/MCParser/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) mc_parser_SRC_FILES := \ @@ -28,3 +31,5 @@ LOCAL_MODULE:= libLLVMMCParser include $(LLVM_DEVICE_BUILD_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Support/Android.mk b/lib/Support/Android.mk index e972753..f7523d1 100644 --- a/lib/Support/Android.mk +++ b/lib/Support/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) support_SRC_FILES := \ @@ -70,3 +73,5 @@ LOCAL_MODULE:= libLLVMSupport include $(LLVM_DEVICE_BUILD_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/System/Android.mk b/lib/System/Android.mk index c0656c0..019ed44 100644 --- a/lib/System/Android.mk +++ b/lib/System/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) system_SRC_FILES := \ @@ -47,3 +50,5 @@ LOCAL_MODULE:= libLLVMSystem include $(LLVM_DEVICE_BUILD_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Target/ARM/Android.mk b/lib/Target/ARM/Android.mk index e4d2f68..2345b65 100644 --- a/lib/Target/ARM/Android.mk +++ b/lib/Target/ARM/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH := $(call my-dir) arm_codegen_TBLGEN_TABLES := \ @@ -68,3 +71,5 @@ include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Target/ARM/AsmParser/Android.mk b/lib/Target/ARM/AsmParser/Android.mk index 6303fd0..e28fa40 100644 --- a/lib/Target/ARM/AsmParser/Android.mk +++ b/lib/Target/ARM/AsmParser/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH := $(call my-dir) # For the device only @@ -9,14 +12,14 @@ TBLGEN_TABLES := \ ARMGenInstrNames.inc \ ARMGenRegisterNames.inc \ ARMGenRegisterInfo.h.inc - + TBLGEN_TD_DIR := $(LOCAL_PATH)/.. LOCAL_SRC_FILES := \ ARMAsmLexer.cpp \ ARMAsmParser.cpp - + LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/.. @@ -25,3 +28,5 @@ LOCAL_MODULE:= libLLVMARMAsmParser include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Target/ARM/AsmPrinter/Android.mk b/lib/Target/ARM/AsmPrinter/Android.mk index 727ab1d..40eddf5 100644 --- a/lib/Target/ARM/AsmPrinter/Android.mk +++ b/lib/Target/ARM/AsmPrinter/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH := $(call my-dir) arm_asm_printer_TBLGEN_TABLES := \ @@ -10,7 +13,7 @@ arm_asm_printer_SRC_FILES := \ ARMAsmPrinter.cpp \ ARMInstPrinter.cpp \ ARMMCInstLower.cpp - + # For the host # ===================================================== include $(CLEAR_VARS) @@ -50,3 +53,5 @@ LOCAL_MODULE:= libLLVMARMAsmPrinter include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Target/ARM/Disassembler/Android.mk b/lib/Target/ARM/Disassembler/Android.mk index 6aead82..4a243e0 100644 --- a/lib/Target/ARM/Disassembler/Android.mk +++ b/lib/Target/ARM/Disassembler/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH := $(call my-dir) # For the device only @@ -18,7 +21,7 @@ TBLGEN_TD_DIR := $(LOCAL_PATH)/.. LOCAL_SRC_FILES := \ ARMDisassembler.cpp \ ARMDisassemblerCore.cpp - + LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/.. @@ -27,3 +30,5 @@ LOCAL_MODULE:= libLLVMARMDisassembler include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Target/ARM/TargetInfo/Android.mk b/lib/Target/ARM/TargetInfo/Android.mk index 9297d36..f594a9d 100644 --- a/lib/Target/ARM/TargetInfo/Android.mk +++ b/lib/Target/ARM/TargetInfo/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH := $(call my-dir) arm_target_info_TBLGEN_TABLES := \ @@ -6,7 +9,7 @@ arm_target_info_TBLGEN_TABLES := \ arm_target_info_SRC_FILES := \ ARMTargetInfo.cpp - + # For the host # ===================================================== include $(CLEAR_VARS) @@ -46,3 +49,5 @@ LOCAL_MODULE:= libLLVMARMInfo include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Target/Android.mk b/lib/Target/Android.mk index 8bf4340..e604e38 100644 --- a/lib/Target/Android.mk +++ b/lib/Target/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) target_SRC_FILES := \ @@ -36,3 +39,5 @@ LOCAL_MODULE:= libLLVMTarget include $(LLVM_DEVICE_BUILD_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Target/X86/Android.mk b/lib/Target/X86/Android.mk index 9cff408..d86ce5c 100644 --- a/lib/Target/X86/Android.mk +++ b/lib/Target/X86/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH := $(call my-dir) # For the host only @@ -17,7 +20,7 @@ TBLGEN_TABLES := \ X86GenFastISel.inc \ X86GenCallingConv.inc \ X86GenSubtarget.inc \ - X86GenEDInfo.inc + X86GenEDInfo.inc LOCAL_SRC_FILES := \ SSEDomainFix.cpp \ @@ -45,3 +48,5 @@ include $(LLVM_HOST_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_HOST_STATIC_LIBRARY) + +endif diff --git a/lib/Target/X86/AsmParser/Android.mk b/lib/Target/X86/AsmParser/Android.mk index c94af7f..6391fb8 100644 --- a/lib/Target/X86/AsmParser/Android.mk +++ b/lib/Target/X86/AsmParser/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH := $(call my-dir) # For the device only @@ -9,14 +12,14 @@ TBLGEN_TABLES := \ X86GenAsmMatcher.inc \ X86GenInstrNames.inc \ X86GenRegisterNames.inc - + TBLGEN_TD_DIR := $(LOCAL_PATH)/.. LOCAL_SRC_FILES := \ X86AsmLexer.cpp \ X86AsmParser.cpp - + LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/.. @@ -25,3 +28,5 @@ LOCAL_MODULE:= libLLVMX86AsmParser include $(LLVM_HOST_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_HOST_STATIC_LIBRARY) + +endif diff --git a/lib/Target/X86/AsmPrinter/Android.mk b/lib/Target/X86/AsmPrinter/Android.mk index 9e4c5e2..e5141b4 100644 --- a/lib/Target/X86/AsmPrinter/Android.mk +++ b/lib/Target/X86/AsmPrinter/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH := $(call my-dir) # For the device only @@ -19,7 +22,7 @@ LOCAL_SRC_FILES := \ X86AsmPrinter.cpp \ X86IntelInstPrinter.cpp \ X86MCInstLower.cpp - + LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/.. @@ -28,3 +31,5 @@ LOCAL_MODULE:= libLLVMX86AsmPrinter include $(LLVM_HOST_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_HOST_STATIC_LIBRARY) + +endif diff --git a/lib/Target/X86/Disassembler/Android.mk b/lib/Target/X86/Disassembler/Android.mk index 548360b..0292972 100644 --- a/lib/Target/X86/Disassembler/Android.mk +++ b/lib/Target/X86/Disassembler/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH := $(call my-dir) # For the device only @@ -9,14 +12,14 @@ TBLGEN_TABLES := \ X86GenDisassemblerTables.inc \ X86GenEDInfo.inc \ X86GenRegisterNames.inc - + TBLGEN_TD_DIR := $(LOCAL_PATH)/.. LOCAL_SRC_FILES := \ X86Disassembler.cpp \ X86DisassemblerDecoder.c - + LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/.. @@ -25,3 +28,5 @@ LOCAL_MODULE:= libLLVMX86Disassembler include $(LLVM_HOST_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_HOST_STATIC_LIBRARY) + +endif diff --git a/lib/Target/X86/TargetInfo/Android.mk b/lib/Target/X86/TargetInfo/Android.mk index ee53f0d..7a3e672 100644 --- a/lib/Target/X86/TargetInfo/Android.mk +++ b/lib/Target/X86/TargetInfo/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH := $(call my-dir) # For the device only @@ -13,7 +16,7 @@ TBLGEN_TD_DIR := $(LOCAL_PATH)/.. LOCAL_SRC_FILES := \ X86TargetInfo.cpp - + LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/.. @@ -22,3 +25,5 @@ LOCAL_MODULE:= libLLVMX86Info include $(LLVM_HOST_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_HOST_STATIC_LIBRARY) + +endif diff --git a/lib/Transforms/IPO/Android.mk b/lib/Transforms/IPO/Android.mk index c5d4b97..06c3f0a 100644 --- a/lib/Transforms/IPO/Android.mk +++ b/lib/Transforms/IPO/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) transforms_ipo_SRC_FILES := \ @@ -46,3 +49,5 @@ LOCAL_MODULE:= libLLVMipo include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Transforms/InstCombine/Android.mk b/lib/Transforms/InstCombine/Android.mk index 0782503..54c49ad 100644 --- a/lib/Transforms/InstCombine/Android.mk +++ b/lib/Transforms/InstCombine/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) transforms_inst_combine_SRC_FILES := \ @@ -36,3 +39,5 @@ LOCAL_MODULE:= libLLVMInstCombine include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Transforms/Scalar/Android.mk b/lib/Transforms/Scalar/Android.mk index 80523ee..c4e1f0b 100644 --- a/lib/Transforms/Scalar/Android.mk +++ b/lib/Transforms/Scalar/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) transforms_scalar_SRC_FILES := \ @@ -35,7 +38,7 @@ transforms_scalar_SRC_FILES := \ # ===================================================== include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(transforms_scalar_SRC_FILES) +LOCAL_SRC_FILES := $(transforms_scalar_SRC_FILES) LOCAL_MODULE:= libLLVMScalarOpts include $(LLVM_HOST_BUILD_MK) @@ -46,9 +49,11 @@ include $(BUILD_HOST_STATIC_LIBRARY) # ===================================================== include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(transforms_scalar_SRC_FILES) +LOCAL_SRC_FILES := $(transforms_scalar_SRC_FILES) LOCAL_MODULE:= libLLVMScalarOpts include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/Transforms/Utils/Android.mk b/lib/Transforms/Utils/Android.mk index 9fba091..6f02fff 100644 --- a/lib/Transforms/Utils/Android.mk +++ b/lib/Transforms/Utils/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) transforms_utils_SRC_FILES := \ @@ -48,3 +51,5 @@ LOCAL_MODULE:= libLLVMTransformUtils include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/lib/VMCore/Android.mk b/lib/VMCore/Android.mk index 8d35cc5..299588b 100644 --- a/lib/VMCore/Android.mk +++ b/lib/VMCore/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) vmcore_SRC_FILES := \ @@ -61,3 +64,5 @@ LOCAL_MODULE:= libLLVMCore include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_STATIC_LIBRARY) + +endif diff --git a/llvm-device-build.mk b/llvm-device-build.mk index 061384a..d5766db 100644 --- a/llvm-device-build.mk +++ b/llvm-device-build.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_CFLAGS := \ -D_GNU_SOURCE \ -D__STDC_LIMIT_MACROS \ @@ -21,7 +24,7 @@ endif ifneq ($(REQUIRES_EH),1) LOCAL_CFLAGS += -fno-exceptions else -# No action. The device target should not have exception enabled since bionic +# No action. The device target should not have exception enabled since bionic # doesn't support it REQUIRES_EH := 0 endif @@ -35,7 +38,7 @@ endif LOCAL_CPPFLAGS := \ $(LOCAL_CPPFLAGS) \ -Woverloaded-virtual - + # Make sure bionic is first so we can include system headers. LOCAL_C_INCLUDES := \ bionic \ @@ -59,3 +62,5 @@ $(hide) $(TBLGEN) \ -gen-$(strip $(1)) \ -o $@ $< endef + +endif diff --git a/llvm-gen-intrinsics.mk b/llvm-gen-intrinsics.mk index decccdd..bde1c9b 100644 --- a/llvm-gen-intrinsics.mk +++ b/llvm-gen-intrinsics.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + # We treat Intrinsics.td as a very special target just like what lib/VMCore/Makefile does INTRINSICTD := $(LLVM_ROOT_PATH)/include/llvm/Intrinsics.td INTRINSICTDS := $(wildcard $(dir $(INTRINSICTD))/Intrinsics*.td) @@ -16,3 +19,5 @@ ifeq ($(LOCAL_IS_HOST_MODULE),true) else $(call transform-device-td-to-out,intrinsic) endif + +endif diff --git a/llvm-host-build.mk b/llvm-host-build.mk index 319f6bc..2a3bb53 100644 --- a/llvm-host-build.mk +++ b/llvm-host-build.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_CFLAGS := \ -D_GNU_SOURCE \ -D__STDC_LIMIT_MACROS \ @@ -33,7 +36,7 @@ endif LOCAL_CPPFLAGS := \ $(LOCAL_CPPFLAGS) \ -Woverloaded-virtual - + # Make sure bionic is first so we can include system headers. LOCAL_C_INCLUDES := \ $(LLVM_ROOT_PATH) \ @@ -57,3 +60,5 @@ $(hide) $(TBLGEN) \ -gen-$(strip $(1)) \ -o $@ $< endef + +endif diff --git a/llvm-tblgen-rules.mk b/llvm-tblgen-rules.mk index a3d71cb..a910875 100644 --- a/llvm-tblgen-rules.mk +++ b/llvm-tblgen-rules.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + ########################################################### ## Commands for running tblgen to compile a td file ########################################################## @@ -11,7 +14,7 @@ endef ## TableGen: Compile .td files to .inc. ########################################################### -# Set LOCAL_MODULE_CLASS to STATIC_LIBRARIES default (require +# Set LOCAL_MODULE_CLASS to STATIC_LIBRARIES default (require # for macro local-intermediates-dir) ifeq ($(LOCAL_MODULE_CLASS),) LOCAL_MODULE_CLASS := STATIC_LIBRARIES @@ -114,3 +117,5 @@ $(intermediates)/ARMGenDecoderTables.inc: $(tblgen_source_dir)/ARM.td $(TBLGEN) endif endif + +endif diff --git a/llvm.mk b/llvm.mk index 33e1175..d5fe841 100644 --- a/llvm.mk +++ b/llvm.mk @@ -1,7 +1,5 @@ # Only use this on the device or emulator. -ifeq ($(TARGET_SIMULATOR),true) -$(error LLVM not suitable for the simulator! $(LOCAL_PATH)) -endif +ifneq ($(TARGET_ARCH),arm) ifeq ($(LLVM_ROOT_PATH),) $(error Must set variable LLVM_ROOT_PATH before including this! $(LOCAL_PATH)) @@ -18,3 +16,5 @@ LLVM_TBLGEN_RULES_MK := $(LLVM_ROOT_PATH)/llvm-tblgen-rules.mk CLANG_ROOT_PATH := $(LLVM_ROOT_PATH)/tools/clang include $(CLANG_ROOT_PATH)/clang.mk + +endif diff --git a/tblgen-rules.mk b/tblgen-rules.mk index 6e7bcf1..cfa3f78 100644 --- a/tblgen-rules.mk +++ b/tblgen-rules.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + ########################################################### ## Commands for running tblgen to compile a td file ########################################################## @@ -111,3 +114,5 @@ $(intermediates)/ARMGenDecoderTables.inc: $(tblgen_source_dir)/ARM.td $(TBLGEN) endif endif + +endif diff --git a/utils/TableGen/Android.mk b/utils/TableGen/Android.mk index 8347d5e..7727fd4 100644 --- a/utils/TableGen/Android.mk +++ b/utils/TableGen/Android.mk @@ -1,3 +1,6 @@ +# Only use this on the device or emulator. +ifneq ($(TARGET_ARCH),arm) + LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) @@ -45,3 +48,5 @@ LOCAL_LDLIBS += -lpthread -lm -ldl include $(LLVM_HOST_BUILD_MK) include $(BUILD_HOST_EXECUTABLE) + +endif -- cgit v1.1