parent
f87fe45d5c
commit
71ecae9d54
|
@ -46,6 +46,7 @@ if (llvm_targets_to_build == "host") {
|
|||
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
|
||||
|
@ -56,6 +57,8 @@ foreach(target, llvm_targets_to_build) {
|
|||
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") {
|
||||
|
@ -63,17 +66,16 @@ foreach(target, llvm_targets_to_build) {
|
|||
} 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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
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" ]
|
||||
}
|
|
@ -61,12 +61,15 @@ group("unittests") {
|
|||
"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" ]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
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",
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue