[llvm] e37dbc6 - [gn build] (manually) port ef16c8eaa5cd5679759 (MCACustomBehaviorAMDGPU)
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 7 18:59:52 PDT 2021
Author: Nico Weber
Date: 2021-07-07T21:59:07-04:00
New Revision: e37dbc6e5703c2755d5fb81949eb32f07bc6ebd6
URL: https://github.com/llvm/llvm-project/commit/e37dbc6e5703c2755d5fb81949eb32f07bc6ebd6
DIFF: https://github.com/llvm/llvm-project/commit/e37dbc6e5703c2755d5fb81949eb32f07bc6ebd6.diff
LOG: [gn build] (manually) port ef16c8eaa5cd5679759 (MCACustomBehaviorAMDGPU)
Added:
llvm/utils/gn/secondary/llvm/tools/llvm-mca/lib/AMDGPU/BUILD.gn
Modified:
llvm/utils/gn/secondary/llvm/tools/llvm-mca/BUILD.gn
Removed:
################################################################################
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 dcea89146765..458598b682f8 100644
--- a/llvm/utils/gn/secondary/llvm/tools/llvm-mca/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-mca/BUILD.gn
@@ -1,3 +1,5 @@
+import("//llvm/lib/Target/targets.gni")
+
executable("llvm-mca") {
deps = [
"//llvm/lib/MC",
@@ -30,4 +32,9 @@ executable("llvm-mca") {
"Views/View.cpp",
"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
new file mode 100644
index 000000000000..3bde981c58ad
--- /dev/null
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-mca/lib/AMDGPU/BUILD.gn
@@ -0,0 +1,15 @@
+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