llvm_build_AArch64 = false
llvm_build_ARM = false
llvm_build_BPF = false
+llvm_build_Mips = false
llvm_build_PowerPC = false
llvm_build_WebAssembly = false
llvm_build_X86 = false
llvm_build_ARM = true
} else if (target == "BPF") {
llvm_build_BPF = true
+ } else if (target == "Mips") {
+ llvm_build_Mips = true
} else if (target == "PowerPC") {
llvm_build_PowerPC = true
} else if (target == "WebAssembly") {
} else if (target == "X86") {
llvm_build_X86 = true
} else if (target == "AMDGPU" || target == "AVR" || target == "Hexagon" ||
- target == "Lanai" || target == "Mips" || target == "NVPTX" ||
- target == "RISCV" || target == "Sparc" || target == "SystemZ") {
+ target == "Lanai" || target == "NVPTX" || target == "RISCV" ||
+ target == "Sparc" || target == "SystemZ") {
# Nothing to do.
} else {
all_targets_string = ""
foreach(target, llvm_all_targets) {
all_targets_string += "$0x0a " + target
}
- assert(false,
- "Unknown target '$target' in llvm_targets_to_build. " +
- "Known targets:" + all_targets_string)
+ assert(false, "Unknown target '$target' in llvm_targets_to_build. " +
+ "Known targets:" + all_targets_string)
}
}
--- /dev/null
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("MipsGenExegesis") {
+ args = [ "-gen-exegesis" ]
+ td_file = "//llvm/lib/Target/Mips/Mips.td"
+}
+
+static_library("Mips") {
+ output_name = "LLVMExegesisMips"
+ deps = [
+ ":MipsGenExegesis",
+
+ # Exegesis reaches inside the Target/Mips tablegen internals and must
+ # depend on these Target/Mips-internal build targets.
+ "//llvm/lib/Target/Mips/MCTargetDesc",
+ ]
+ sources = [
+ "Target.cpp",
+ ]
+ include_dirs = [ "//llvm/lib/Target/Mips" ]
+}
"tools/llvm-exegesis/ARM:LLVMExegesisARMTests",
]
}
- if (llvm_build_WebAssembly) {
- deps += [ "Target/WebAssembly:WebAssemblyTests" ]
+ if (llvm_build_Mips) {
+ deps += [ "tools/llvm-exegesis/Mips:LLVMExegesisMipsTests" ]
}
if (llvm_build_PowerPC) {
deps += [ "tools/llvm-exegesis/PowerPC:LLVMExegesisPowerPCTests" ]
}
+ if (llvm_build_WebAssembly) {
+ deps += [ "Target/WebAssembly:WebAssemblyTests" ]
+ }
if (llvm_build_X86) {
deps += [ "tools/llvm-exegesis/X86:LLVMExegesisX86Tests" ]
}
--- /dev/null
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("LLVMExegesisMipsTests") {
+ deps = [
+ "//llvm/lib/DebugInfo/Symbolize",
+ "//llvm/lib/MC",
+ "//llvm/lib/MC/MCParser",
+ "//llvm/lib/Object",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/Mips",
+
+ # Exegesis reaches inside the Target/Mips tablegen internals and must
+ # depend on these Target/Mips-internal build targets.
+ "//llvm/lib/Target/Mips/MCTargetDesc",
+ "//llvm/tools/llvm-exegesis/lib",
+ "//llvm/tools/llvm-exegesis/lib/Mips",
+ ]
+ include_dirs = [
+ "//llvm/lib/Target/Mips",
+ "//llvm/tools/llvm-exegesis/lib",
+ ]
+ sources = [
+ "TargetTest.cpp",
+ ]
+}