diff options
-rw-r--r-- | lib/Target/ARM/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/ARM/Disassembler/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/ARM/MCTargetDesc/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/ARM/TargetInfo/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/Mips/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/Mips/Disassembler/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/Mips/MCTargetDesc/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/Mips/TargetInfo/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/X86/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/X86/Disassembler/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/X86/InstPrinter/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/X86/MCTargetDesc/Android.mk | 2 | ||||
-rw-r--r-- | lib/Target/X86/TargetInfo/Android.mk | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/Android.mk | 4 | ||||
-rw-r--r-- | llvm-device-build.mk | 2 | ||||
-rw-r--r-- | llvm-gen-intrinsics.mk | 2 | ||||
-rw-r--r-- | llvm-tblgen-rules.mk | 106 | ||||
-rw-r--r-- | llvm.mk | 2 | ||||
-rw-r--r-- | shared_llvm.mk | 26 | ||||
-rw-r--r-- | tools/llc/Android.mk | 26 |
20 files changed, 75 insertions, 119 deletions
diff --git a/lib/Target/ARM/Android.mk b/lib/Target/ARM/Android.mk index 25b0d89..86649b2 100644 --- a/lib/Target/ARM/Android.mk +++ b/lib/Target/ARM/Android.mk @@ -67,7 +67,6 @@ include $(BUILD_HOST_STATIC_LIBRARY) # For the device only # ===================================================== -ifeq ($(TARGET_ARCH),arm) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -82,4 +81,3 @@ 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/Disassembler/Android.mk b/lib/Target/ARM/Disassembler/Android.mk index 51e364b..45a5407 100644 --- a/lib/Target/ARM/Disassembler/Android.mk +++ b/lib/Target/ARM/Disassembler/Android.mk @@ -11,7 +11,6 @@ arm_disassembler_SRC_FILES := \ # For the device # ===================================================== -ifeq ($(TARGET_ARCH),arm) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -30,7 +29,6 @@ LOCAL_MODULE_TAGS := optional include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_STATIC_LIBRARY) -endif # For the host # ===================================================== diff --git a/lib/Target/ARM/MCTargetDesc/Android.mk b/lib/Target/ARM/MCTargetDesc/Android.mk index af22753..faa482c 100644 --- a/lib/Target/ARM/MCTargetDesc/Android.mk +++ b/lib/Target/ARM/MCTargetDesc/Android.mk @@ -40,7 +40,6 @@ include $(BUILD_HOST_STATIC_LIBRARY) # For the device only # ===================================================== -ifeq ($(TARGET_ARCH),arm) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -57,4 +56,3 @@ 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/TargetInfo/Android.mk b/lib/Target/ARM/TargetInfo/Android.mk index d1af6ae..de4416e 100644 --- a/lib/Target/ARM/TargetInfo/Android.mk +++ b/lib/Target/ARM/TargetInfo/Android.mk @@ -32,7 +32,6 @@ include $(BUILD_HOST_STATIC_LIBRARY) # For the device # ===================================================== -ifeq ($(TARGET_ARCH),arm) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -52,4 +51,3 @@ LOCAL_MODULE_TAGS := optional include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_STATIC_LIBRARY) -endif diff --git a/lib/Target/Mips/Android.mk b/lib/Target/Mips/Android.mk index 954b1d0..97c6d9b 100644 --- a/lib/Target/Mips/Android.mk +++ b/lib/Target/Mips/Android.mk @@ -65,7 +65,6 @@ include $(BUILD_HOST_STATIC_LIBRARY) # For the device only # ===================================================== -ifeq ($(TARGET_ARCH),mips) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -81,4 +80,3 @@ 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/Mips/Disassembler/Android.mk b/lib/Target/Mips/Disassembler/Android.mk index 4e38c4b..868b43a 100644 --- a/lib/Target/Mips/Disassembler/Android.mk +++ b/lib/Target/Mips/Disassembler/Android.mk @@ -11,7 +11,6 @@ mips_disassembler_SRC_FILES := \ # For the device # ===================================================== -ifeq ($(TARGET_ARCH),mips) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -27,7 +26,6 @@ TBLGEN_TD_DIR := $(LOCAL_PATH)/.. include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_STATIC_LIBRARY) -endif # For the host # ===================================================== diff --git a/lib/Target/Mips/MCTargetDesc/Android.mk b/lib/Target/Mips/MCTargetDesc/Android.mk index fcf58c3..1bf2dea 100644 --- a/lib/Target/Mips/MCTargetDesc/Android.mk +++ b/lib/Target/Mips/MCTargetDesc/Android.mk @@ -36,7 +36,6 @@ include $(BUILD_HOST_STATIC_LIBRARY) # For the device only # ===================================================== -ifeq ($(TARGET_ARCH),mips) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -53,4 +52,3 @@ 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/Mips/TargetInfo/Android.mk b/lib/Target/Mips/TargetInfo/Android.mk index e3f41bc..8db12d3 100644 --- a/lib/Target/Mips/TargetInfo/Android.mk +++ b/lib/Target/Mips/TargetInfo/Android.mk @@ -28,7 +28,6 @@ include $(BUILD_HOST_STATIC_LIBRARY) # For the device # ===================================================== -ifeq ($(TARGET_ARCH),mips) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -44,4 +43,3 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/.. include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_STATIC_LIBRARY) -endif diff --git a/lib/Target/X86/Android.mk b/lib/Target/X86/Android.mk index a9c413d..c9840c3 100644 --- a/lib/Target/X86/Android.mk +++ b/lib/Target/X86/Android.mk @@ -53,7 +53,6 @@ include $(BUILD_HOST_STATIC_LIBRARY) # For the device only # ===================================================== -ifeq ($(TARGET_ARCH),x86) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -69,4 +68,3 @@ 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/X86/Disassembler/Android.mk b/lib/Target/X86/Disassembler/Android.mk index 1cee663..67400ad 100644 --- a/lib/Target/X86/Disassembler/Android.mk +++ b/lib/Target/X86/Disassembler/Android.mk @@ -11,7 +11,6 @@ x86_disassembler_SRC_FILES := \ # For the device # ===================================================== -ifeq ($(TARGET_ARCH),x86) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -30,7 +29,6 @@ LOCAL_MODULE_TAGS := optional include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_STATIC_LIBRARY) -endif # For the host # ===================================================== diff --git a/lib/Target/X86/InstPrinter/Android.mk b/lib/Target/X86/InstPrinter/Android.mk index 0fd7058..633df62 100644 --- a/lib/Target/X86/InstPrinter/Android.mk +++ b/lib/Target/X86/InstPrinter/Android.mk @@ -14,7 +14,6 @@ x86_instprinter_SRC_FILES := \ # For the device # ===================================================== -ifeq ($(TARGET_ARCH),x86) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -33,7 +32,6 @@ LOCAL_MODULE_TAGS := optional include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_STATIC_LIBRARY) -endif # For the host # ===================================================== diff --git a/lib/Target/X86/MCTargetDesc/Android.mk b/lib/Target/X86/MCTargetDesc/Android.mk index 31ba842..65cd8df 100644 --- a/lib/Target/X86/MCTargetDesc/Android.mk +++ b/lib/Target/X86/MCTargetDesc/Android.mk @@ -36,7 +36,6 @@ include $(BUILD_HOST_STATIC_LIBRARY) # For the device only # ===================================================== -ifeq ($(TARGET_ARCH),x86) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -53,4 +52,3 @@ 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/X86/TargetInfo/Android.mk b/lib/Target/X86/TargetInfo/Android.mk index c72b383..1c53475 100644 --- a/lib/Target/X86/TargetInfo/Android.mk +++ b/lib/Target/X86/TargetInfo/Android.mk @@ -32,7 +32,6 @@ include $(BUILD_HOST_STATIC_LIBRARY) # For the device # ===================================================== -ifeq ($(TARGET_ARCH),x86) include $(CLEAR_VARS) include $(CLEAR_TBLGEN_VARS) @@ -52,4 +51,3 @@ LOCAL_MODULE_TAGS := optional include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_TBLGEN_RULES_MK) include $(BUILD_STATIC_LIBRARY) -endif diff --git a/lib/Transforms/Scalar/Android.mk b/lib/Transforms/Scalar/Android.mk index d2e1478..d79fabe 100644 --- a/lib/Transforms/Scalar/Android.mk +++ b/lib/Transforms/Scalar/Android.mk @@ -59,9 +59,7 @@ LOCAL_MODULE:= libLLVMScalarOpts # Override the default optimization level to work around a SIGSEGV # on x86 target builds for SROA.cpp. # Bug: 8047767 -ifeq ($(TARGET_ARCH),x86) -LOCAL_CFLAGS += -O1 -endif +LOCAL_CFLAGS_x86 += -O1 LOCAL_MODULE_TAGS := optional diff --git a/llvm-device-build.mk b/llvm-device-build.mk index 30baec0..70c9a84 100644 --- a/llvm-device-build.mk +++ b/llvm-device-build.mk @@ -1,3 +1,5 @@ +LOCAL_MODULE_TARGET_ARCH := $(LLVM_SUPPORTED_ARCH) + LOCAL_CFLAGS := \ -D_GNU_SOURCE \ -D__STDC_LIMIT_MACROS \ diff --git a/llvm-gen-intrinsics.mk b/llvm-gen-intrinsics.mk index bae748e..358027b 100644 --- a/llvm-gen-intrinsics.mk +++ b/llvm-gen-intrinsics.mk @@ -8,7 +8,7 @@ ifeq ($(LOCAL_MODULE_CLASS),) LOCAL_MODULE_CLASS := STATIC_LIBRARIES endif -GENFILE := $(addprefix $(call local-intermediates-dir)/llvm/IR/,Intrinsics.gen) +GENFILE := $(addprefix $(call local-generated-sources-dir)/llvm/IR/,Intrinsics.gen) LOCAL_GENERATED_SOURCES += $(GENFILE) $(GENFILE): TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) $(GENFILE): $(INTRINSICTD) $(INTRINSICTDS) | $(TBLGEN) diff --git a/llvm-tblgen-rules.mk b/llvm-tblgen-rules.mk index e3a7ca3..0746e8b 100644 --- a/llvm-tblgen-rules.mk +++ b/llvm-tblgen-rules.mk @@ -12,15 +12,15 @@ endef ########################################################### # Set LOCAL_MODULE_CLASS to STATIC_LIBRARIES default (require -# for macro local-intermediates-dir) +# for macro local-generated-sources-dir) ifeq ($(LOCAL_MODULE_CLASS),) LOCAL_MODULE_CLASS := STATIC_LIBRARIES endif ifneq ($(strip $(TBLGEN_TABLES)),) -intermediates := $(call local-intermediates-dir) -tblgen_gen_tables := $(addprefix $(intermediates)/,$(TBLGEN_TABLES)) +generated_sources := $(call local-generated-sources-dir) +tblgen_gen_tables := $(addprefix $(generated_sources)/,$(TBLGEN_TABLES)) LOCAL_GENERATED_SOURCES += $(tblgen_gen_tables) tblgen_source_dir := $(LOCAL_PATH) @@ -39,165 +39,165 @@ tblgen_td_deps := $(wildcard $(tblgen_td_deps)) # The directory and the .td directory is not the same. # ifeq ($(tblgen_source_dir),$(LLVM_ROOT_PATH)/lib/Target/ARM/MCTargetDesc) -$(intermediates)/%GenRegisterInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenRegisterInfo.inc: $(tblgen_source_dir)/../%.td \ +$(generated_sources)/%GenRegisterInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenRegisterInfo.inc: $(tblgen_source_dir)/../%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out, register-info) -$(intermediates)/%GenInstrInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenInstrInfo.inc: $(tblgen_source_dir)/../%.td \ +$(generated_sources)/%GenInstrInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenInstrInfo.inc: $(tblgen_source_dir)/../%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,instr-info) -$(intermediates)/%GenSubtargetInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenSubtargetInfo.inc: $(tblgen_source_dir)/../%.td \ +$(generated_sources)/%GenSubtargetInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenSubtargetInfo.inc: $(tblgen_source_dir)/../%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,subtarget) endif ifeq ($(tblgen_source_dir),$(LLVM_ROOT_PATH)/lib/Target/X86/MCTargetDesc) -$(intermediates)/%GenRegisterInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenRegisterInfo.inc: $(tblgen_source_dir)/../%.td \ +$(generated_sources)/%GenRegisterInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenRegisterInfo.inc: $(tblgen_source_dir)/../%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out, register-info) -$(intermediates)/%GenInstrInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenInstrInfo.inc: $(tblgen_source_dir)/../%.td \ +$(generated_sources)/%GenInstrInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenInstrInfo.inc: $(tblgen_source_dir)/../%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,instr-info) -$(intermediates)/%GenSubtargetInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenSubtargetInfo.inc: $(tblgen_source_dir)/../%.td \ +$(generated_sources)/%GenSubtargetInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenSubtargetInfo.inc: $(tblgen_source_dir)/../%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,subtarget) endif ifeq ($(tblgen_source_dir),$(LLVM_ROOT_PATH)/lib/Target/Mips/MCTargetDesc) -$(intermediates)/%GenRegisterInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenRegisterInfo.inc: $(tblgen_source_dir)/../%.td \ +$(generated_sources)/%GenRegisterInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenRegisterInfo.inc: $(tblgen_source_dir)/../%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out, register-info) -$(intermediates)/%GenInstrInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenInstrInfo.inc: $(tblgen_source_dir)/../%.td \ +$(generated_sources)/%GenInstrInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenInstrInfo.inc: $(tblgen_source_dir)/../%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,instr-info) -$(intermediates)/%GenSubtargetInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenSubtargetInfo.inc: $(tblgen_source_dir)/../%.td \ +$(generated_sources)/%GenSubtargetInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenSubtargetInfo.inc: $(tblgen_source_dir)/../%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,subtarget) endif ifneq ($(filter %GenRegisterInfo.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenRegisterInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenRegisterInfo.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenRegisterInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenRegisterInfo.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,register-info) endif ifneq ($(filter %GenInstrInfo.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenInstrInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenInstrInfo.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenInstrInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenInstrInfo.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,instr-info) endif ifneq ($(filter %GenAsmWriter.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenAsmWriter.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenAsmWriter.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenAsmWriter.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenAsmWriter.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,asm-writer) endif ifneq ($(filter %GenAsmWriter1.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenAsmWriter1.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenAsmWriter1.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenAsmWriter1.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenAsmWriter1.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,asm-writer -asmwriternum=1) endif ifneq ($(filter %GenAsmMatcher.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenAsmMatcher.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenAsmMatcher.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenAsmMatcher.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenAsmMatcher.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,asm-matcher) endif ifneq ($(filter %GenCodeEmitter.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenCodeEmitter.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenCodeEmitter.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenCodeEmitter.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenCodeEmitter.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,emitter) endif ifneq ($(filter %GenMCCodeEmitter.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenMCCodeEmitter.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenMCCodeEmitter.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenMCCodeEmitter.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenMCCodeEmitter.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,emitter -mc-emitter) endif ifneq ($(filter %GenMCPseudoLowering.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenMCPseudoLowering.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenMCPseudoLowering.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenMCPseudoLowering.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenMCPseudoLowering.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,pseudo-lowering) endif ifneq ($(filter %GenDAGISel.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenDAGISel.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenDAGISel.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenDAGISel.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenDAGISel.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,dag-isel) endif ifneq ($(filter %GenDisassemblerTables.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenDisassemblerTables.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenDisassemblerTables.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenDisassemblerTables.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenDisassemblerTables.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,disassembler) endif ifneq ($(filter %GenEDInfo.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenEDInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenEDInfo.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenEDInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenEDInfo.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,enhanced-disassembly-info) endif ifneq ($(filter %GenFastISel.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenFastISel.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenFastISel.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenFastISel.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenFastISel.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,fast-isel) endif ifneq ($(filter %GenSubtargetInfo.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenSubtargetInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenSubtargetInfo.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenSubtargetInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenSubtargetInfo.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,subtarget) endif ifneq ($(filter %GenCallingConv.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenCallingConv.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenCallingConv.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenCallingConv.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenCallingConv.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,callingconv) endif ifneq ($(filter %GenIntrinsics.inc,$(tblgen_gen_tables)),) -$(intermediates)/%GenIntrinsics.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/%GenIntrinsics.inc: $(tblgen_source_dir)/%.td \ +$(generated_sources)/%GenIntrinsics.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/%GenIntrinsics.inc: $(tblgen_source_dir)/%.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,tgt_intrinsics) endif ifneq ($(findstring ARMGenDecoderTables.inc,$(tblgen_gen_tables)),) -$(intermediates)/ARMGenDecoderTables.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) -$(intermediates)/ARMGenDecoderTables.inc: $(tblgen_source_dir)/ARM.td \ +$(generated_sources)/ARMGenDecoderTables.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) +$(generated_sources)/ARMGenDecoderTables.inc: $(tblgen_source_dir)/ARM.td \ $(tblgen_td_deps) | $(TBLGEN) $(call transform-td-to-out,arm-decoder) endif @@ -9,3 +9,5 @@ LLVM_HOST_BUILD_MK := $(LLVM_ROOT_PATH)/llvm-host-build.mk LLVM_DEVICE_BUILD_MK := $(LLVM_ROOT_PATH)/llvm-device-build.mk LLVM_GEN_INTRINSICS_MK := $(LLVM_ROOT_PATH)/llvm-gen-intrinsics.mk LLVM_TBLGEN_RULES_MK := $(LLVM_ROOT_PATH)/llvm-tblgen-rules.mk + +LLVM_SUPPORTED_ARCH := arm mips x86 x86_64 diff --git a/shared_llvm.mk b/shared_llvm.mk index 718afb3..14c60b9 100644 --- a/shared_llvm.mk +++ b/shared_llvm.mk @@ -81,9 +81,10 @@ endif include $(LLVM_HOST_BUILD_MK) include $(BUILD_HOST_SHARED_LIBRARY) -#TODOArm64: Enable llvm build -#TODOMips64: Enable llvm build -ifeq ($(filter $(TARGET_ARCH),arm64 mips64),) +ifeq (,$(filter $(TARGET_ARCH),$(LLVM_SUPPORTED_ARCH))) +$(warning TODO $(TARGET_ARCH): Enable llvm build) +endif + # DEVICE LLVM shared library build include $(CLEAR_VARS) @@ -95,19 +96,10 @@ LOCAL_MODULE_TAGS := optional LOCAL_WHOLE_STATIC_LIBRARIES := \ $(llvm_pre_static_libraries) -ifeq ($(TARGET_ARCH),arm) - LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_arm_static_libraries) -else - ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64 x32)) - LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_x86_static_libraries) - else - ifeq ($(TARGET_ARCH),mips) - LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_mips_static_libraries) - else - $(error Unsupported architecture $(TARGET_ARCH)) - endif - endif -endif +LOCAL_WHOLE_STATIC_LIBRARIES_arm += $(llvm_arm_static_libraries) +LOCAL_WHOLE_STATIC_LIBRARIES_x86 += $(llvm_x86_static_libraries) +LOCAL_WHOLE_STATIC_LIBRARIES_x86_64 += $(llvm_x86_static_libraries) +LOCAL_WHOLE_STATIC_LIBRARIES_mips += $(llvm_mips_static_libraries) LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_post_static_libraries) @@ -117,6 +109,4 @@ LOCAL_SHARED_LIBRARIES := libcutils libdl libstlport include $(LLVM_DEVICE_BUILD_MK) include $(BUILD_SHARED_LIBRARY) -endif # !(arm64 || mips64) - endif # don't build in unbundled branches diff --git a/tools/llc/Android.mk b/tools/llc/Android.mk index af1f75a..fde9f8c 100644 --- a/tools/llc/Android.mk +++ b/tools/llc/Android.mk @@ -91,9 +91,10 @@ include $(BUILD_HOST_EXECUTABLE) # llc command line tool (target) #===---------------------------------------------------------------=== -#TODOArm64: Enable llc build -#TODOMips64: Enable llc build -ifeq ($(filter $(TARGET_ARCH),arm64 mips64),) +ifeq (,$(filter $(TARGET_ARCH),$(LLVM_SUPPORTED_ARCH))) +$(warning TODO $(TARGET_ARCH): Enable llc build) +endif + include $(CLEAR_VARS) LOCAL_MODULE := llc @@ -103,19 +104,10 @@ LOCAL_MODULE_CLASS := EXECUTABLES LOCAL_SRC_FILES := $(llvm_llc_SRC_FILES) LOCAL_C_INCLUDES += external/llvm/include -ifeq ($(TARGET_ARCH),arm) - LOCAL_STATIC_LIBRARIES := $(llvm_llc_arm_STATIC_LIBRARIES) -else - ifeq ($(TARGET_ARCH),mips) - LOCAL_STATIC_LIBRARIES := $(llvm_llc_mips_STATIC_LIBRARIES) - else - ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64 x32)) - LOCAL_STATIC_LIBRARIES := $(llvm_llc_x86_STATIC_LIBRARIES) - else - $(error "Unsupport llc target $(TARGET_ARCH)") - endif - endif -endif +LOCAL_STATIC_LIBRARIES_arm := $(llvm_llc_arm_STATIC_LIBRARIES) +LOCAL_STATIC_LIBRARIES_mips := $(llvm_llc_mips_STATIC_LIBRARIES) +LOCAL_STATIC_LIBRARIES_x86 := $(llvm_llc_x86_STATIC_LIBRARIES) +LOCAL_STATIC_LIBRARIES_x86_64 := $(llvm_llc_x86_STATIC_LIBRARIES) LOCAL_STATIC_LIBRARIES += $(llvm_llc_STATIC_LIBRARIES) @@ -128,5 +120,3 @@ include $(LLVM_ROOT_PATH)/llvm.mk include $(LLVM_DEVICE_BUILD_MK) include $(LLVM_GEN_INTRINSICS_MK) include $(BUILD_EXECUTABLE) - -endif # !(arm64 || mips64) |