[llvm] 3143ee4 - [gn build] Manually port dbed061b
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 28 15:46:12 PDT 2021
Author: Arthur Eubanks
Date: 2021-07-28T15:45:30-07:00
New Revision: 3143ee4ddf5dd5b202f8d31abf703fe247f6008b
URL: https://github.com/llvm/llvm-project/commit/3143ee4ddf5dd5b202f8d31abf703fe247f6008b
DIFF: https://github.com/llvm/llvm-project/commit/3143ee4ddf5dd5b202f8d31abf703fe247f6008b.diff
LOG: [gn build] Manually port dbed061b
Added:
llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/MCA/BUILD.gn
Modified:
llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
llvm/utils/gn/secondary/llvm/tools/llvm-mca/BUILD.gn
Removed:
llvm/utils/gn/secondary/llvm/tools/llvm-mca/lib/AMDGPU/BUILD.gn
################################################################################
diff --git a/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn b/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
index 178b71d24f8cd..74828a6e9acf9 100644
--- a/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
@@ -337,6 +337,7 @@ write_cmake_config("llvm-config") {
"LLVM_NATIVE_TARGET=1",
"LLVM_NATIVE_TARGETINFO=1",
"LLVM_NATIVE_TARGETMC=1",
+ "LLVM_NATIVE_TARGETMCA=1",
# FIXME: Set to 1 on mac once the 10.14 SDK is in common use.
"LLVM_SUPPORT_XCODE_SIGNPOSTS=",
@@ -431,6 +432,12 @@ write_target_def_file("Targets.def") {
value = "LLVM_TARGET"
}
+write_target_def_file("TargetMCAs.def") {
+ key = "LLVM_ENUM_TARGETMCAS"
+ value = "LLVM_TARGETMCA"
+ all_targets = []
+}
+
group("write_target_def_files") {
visibility = [
"//llvm/lib/Support",
@@ -440,6 +447,7 @@ group("write_target_def_files") {
":AsmParsers.def",
":AsmPrinters.def",
":Disassemblers.def",
+ ":TargetMCAs.def",
":Targets.def",
]
}
diff --git a/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
index 058a17bbe8b42..9a831ba9b1f5a 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
@@ -241,6 +241,7 @@ group("AMDGPU") {
":LLVMAMDGPUCodeGen",
"AsmParser",
"Disassembler",
+ "MCA",
"MCTargetDesc",
"TargetInfo",
"Utils",
diff --git a/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/MCA/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/MCA/BUILD.gn
new file mode 100644
index 0000000000000..9f65d17057ec0
--- /dev/null
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/MCA/BUILD.gn
@@ -0,0 +1,9 @@
+static_library("MCA") {
+ output_name = "LLVMAMDGPUTargetMCA"
+ deps = [
+ "//llvm/lib/Target/AMDGPU/MCTargetDesc",
+ "//llvm/lib/Target/AMDGPU/Utils",
+ ]
+ include_dirs = [ ".." ]
+ sources = [ "AMDGPUCustomBehaviour.cpp" ]
+}
diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-mca/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-mca/BUILD.gn
index 458598b682f86..0b6b2bc0dca86 100644
--- a/llvm/utils/gn/secondary/llvm/tools/llvm-mca/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-mca/BUILD.gn
@@ -33,8 +33,4 @@ executable("llvm-mca") {
"llvm-mca.cpp",
]
defines = []
- if (llvm_build_AMDGPU) {
- deps += [ "//llvm/tools/llvm-mca/lib/AMDGPU" ]
- defines += [ "HAS_AMDGPU" ]
- }
}
diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-mca/lib/AMDGPU/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-mca/lib/AMDGPU/BUILD.gn
deleted file mode 100644
index 3bde981c58add..0000000000000
--- a/llvm/utils/gn/secondary/llvm/tools/llvm-mca/lib/AMDGPU/BUILD.gn
+++ /dev/null
@@ -1,15 +0,0 @@
-static_library("AMDGPU") {
- output_name = "LLVMMCACustomBehaviourAMDGPU"
- deps = [
- "//llvm/lib/IR",
- "//llvm/lib/Support",
- "//llvm/lib/Target/AMDGPU",
-
- # llvm-mca/libAMDGPU reaches inside the Target/AMDGPU tablegen internals
- # and must depend on these Target/AMDGPU-internal build targets.
- "//llvm/lib/Target/AMDGPU/MCTargetDesc",
- "//llvm/lib/Target/AMDGPU/Utils",
- ]
- include_dirs = [ "//llvm/lib/Target/AMDGPU" ]
- sources = [ "AMDGPUCustomBehaviour.cpp" ]
-}
More information about the llvm-commits
mailing list