[llvm] 08a9b22 - [gn build] port d62480c1995b (LoongArchTests)
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 04:43:31 PST 2022
Author: Nico Weber
Date: 2022-12-07T07:43:19-05:00
New Revision: 08a9b22df100c7f25ba80aefdfd9b185c1b41753
URL: https://github.com/llvm/llvm-project/commit/08a9b22df100c7f25ba80aefdfd9b185c1b41753
DIFF: https://github.com/llvm/llvm-project/commit/08a9b22df100c7f25ba80aefdfd9b185c1b41753.diff
LOG: [gn build] port d62480c1995b (LoongArchTests)
Added:
llvm/utils/gn/secondary/llvm/unittests/Target/LoongArch/BUILD.gn
Modified:
llvm/utils/gn/secondary/llvm/lib/Target/targets.gni
llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni b/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni
index 42e48e650af01..14c5fdc6dd4be 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni
@@ -53,6 +53,7 @@ llvm_build_AArch64 = false
llvm_build_AMDGPU = false
llvm_build_ARM = false
llvm_build_BPF = false
+llvm_build_LoongArch = false
llvm_build_Mips = false
llvm_build_PowerPC = false
llvm_build_SystemZ = false
@@ -71,6 +72,8 @@ foreach(target, llvm_targets_to_build) {
llvm_build_ARM = true
} else if (target == "BPF") {
llvm_build_BPF = true
+ } else if (target == "LoongArch") {
+ llvm_build_LoongArch = true
} else if (target == "Mips") {
llvm_build_Mips = true
} else if (target == "PowerPC") {
@@ -82,8 +85,8 @@ foreach(target, llvm_targets_to_build) {
} else if (target == "X86") {
llvm_build_X86 = true
} else if (target == "AVR" || target == "Hexagon" || target == "Lanai" ||
- target == "LoongArch" || target == "NVPTX" || target == "RISCV" ||
- target == "Sparc" || target == "SystemZ") {
+ target == "NVPTX" || target == "RISCV" || target == "Sparc" ||
+ target == "SystemZ") {
# Nothing to do.
} else {
all_targets_string = ""
diff --git a/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
index feb2622cf8bed..dde0c8ac4e36a 100644
--- a/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
@@ -80,6 +80,9 @@ group("unittests") {
"tools/llvm-exegesis/ARM:LLVMExegesisARMTests",
]
}
+ if (llvm_build_LoongArch) {
+ deps += [ "Target/LoongArch:LoongArchTests" ]
+ }
if (llvm_build_Mips) {
deps += [ "tools/llvm-exegesis/Mips:LLVMExegesisMipsTests" ]
}
diff --git a/llvm/utils/gn/secondary/llvm/unittests/Target/LoongArch/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/Target/LoongArch/BUILD.gn
new file mode 100644
index 0000000000000..794b9f8b113dd
--- /dev/null
+++ b/llvm/utils/gn/secondary/llvm/unittests/Target/LoongArch/BUILD.gn
@@ -0,0 +1,14 @@
+import("//third-party/unittest/unittest.gni")
+
+unittest("LoongArchTests") {
+ deps = [
+ "//llvm/lib/CodeGen/MIRParser",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target",
+ "//llvm/lib/Target/LoongArch:LLVMLoongArchCodeGen",
+ "//llvm/lib/Target/LoongArch/MCTargetDesc",
+ "//llvm/lib/Target/LoongArch/TargetInfo",
+ ]
+ include_dirs = [ "//llvm/lib/Target/LoongArch" ]
+ sources = [ "InstSizes.cpp" ]
+}
More information about the llvm-commits
mailing list