[llvm] 552bd47 - [gn build] Port 24698e526f619271705fe72bcaa928be9bc82484
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 23 10:04:55 PDT 2020
Author: Fangrui Song
Date: 2020-03-23T10:04:36-07:00
New Revision: 552bd477f8ebef12ee5e50ab7150dd55890549e4
URL: https://github.com/llvm/llvm-project/commit/552bd477f8ebef12ee5e50ab7150dd55890549e4
DIFF: https://github.com/llvm/llvm-project/commit/552bd477f8ebef12ee5e50ab7150dd55890549e4.diff
LOG: [gn build] Port 24698e526f619271705fe72bcaa928be9bc82484
Added:
llvm/utils/gn/secondary/llvm/unittests/MC/AMDGPU/BUILD.gn
llvm/utils/gn/secondary/llvm/unittests/Target/AMDGPU/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 8306b5daabcc..0fb7f4c5daa2 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni
@@ -45,6 +45,7 @@ if (llvm_targets_to_build == "host") {
# unittest targets).
llvm_build_AArch64 = false
llvm_build_ARM = false
+llvm_build_AMDGPU = false
llvm_build_BPF = false
llvm_build_Mips = false
llvm_build_PowerPC = false
@@ -53,6 +54,8 @@ llvm_build_X86 = false
foreach(target, llvm_targets_to_build) {
if (target == "AArch64") {
llvm_build_AArch64 = true
+ } else if (target == "AMDGPU") {
+ llvm_build_AMDGPU = true
} else if (target == "ARM") {
llvm_build_ARM = true
} else if (target == "BPF") {
@@ -65,7 +68,7 @@ foreach(target, llvm_targets_to_build) {
llvm_build_WebAssembly = true
} else if (target == "X86") {
llvm_build_X86 = true
- } else if (target == "AMDGPU" || target == "AVR" || target == "Hexagon" ||
+ } else if (target == "AVR" || target == "Hexagon" ||
target == "Lanai" || target == "NVPTX" || target == "RISCV" ||
target == "Sparc" || target == "SystemZ") {
# Nothing to do.
diff --git a/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
index fb951086571d..3d960d501e42 100644
--- a/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
@@ -56,6 +56,12 @@ group("unittests") {
"tools/llvm-exegesis/AArch64:LLVMExegesisAArch64Tests",
]
}
+ if (llvm_build_AMDGPU) {
+ deps += [
+ "MC/AMDGPU:AMDGPUDwarfTests",
+ "Target/AMDGPU:AMDGPUTests",
+ ]
+ }
if (llvm_build_ARM) {
deps += [
"Target/ARM:ARMTests",
diff --git a/llvm/utils/gn/secondary/llvm/unittests/MC/AMDGPU/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/MC/AMDGPU/BUILD.gn
new file mode 100644
index 000000000000..8d1763e65f0c
--- /dev/null
+++ b/llvm/utils/gn/secondary/llvm/unittests/MC/AMDGPU/BUILD.gn
@@ -0,0 +1,14 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("AMDGPUDwarfTests") {
+ deps = [
+ "//llvm/lib/MC",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/AMDGPU:LLVMAMDGPUCodeGen",
+ "//llvm/lib/Target/AMDGPU/MCTargetDesc",
+ "//llvm/lib/Target/AMDGPU/TargetInfo",
+ ]
+ sources = [
+ "DwarfRegMappings.cpp",
+ ]
+}
diff --git a/llvm/utils/gn/secondary/llvm/unittests/Target/AMDGPU/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/Target/AMDGPU/BUILD.gn
new file mode 100644
index 000000000000..3e156fc6ee70
--- /dev/null
+++ b/llvm/utils/gn/secondary/llvm/unittests/Target/AMDGPU/BUILD.gn
@@ -0,0 +1,15 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("AMDGPUTests") {
+ deps = [
+ "//llvm/lib/Support",
+ "//llvm/lib/Target",
+ "//llvm/lib/Target/AMDGPU:LLVMAMDGPUCodeGen",
+ "//llvm/lib/Target/AMDGPU/MCTargetDesc",
+ "//llvm/lib/Target/AMDGPU/TargetInfo",
+ ]
+ sources = [
+ # Make `gn format` not collapse this, for sync_source_lists_from_cmake.py.
+ "DwarfRegMappings.cpp",
+ ]
+}
More information about the llvm-commits
mailing list