[llvm] bf95d5e - [gn build] (manually) port 85e6e748d426 (llvm/lib/Target/X86/MCA)
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 11 18:45:02 PST 2022
Author: Nico Weber
Date: 2022-01-11T21:44:53-05:00
New Revision: bf95d5e334885936e24face2b6f76686d24327df
URL: https://github.com/llvm/llvm-project/commit/bf95d5e334885936e24face2b6f76686d24327df
DIFF: https://github.com/llvm/llvm-project/commit/bf95d5e334885936e24face2b6f76686d24327df.diff
LOG: [gn build] (manually) port 85e6e748d426 (llvm/lib/Target/X86/MCA)
Added:
llvm/utils/gn/secondary/llvm/lib/Target/X86/MCA/BUILD.gn
Modified:
llvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn
llvm/utils/gn/secondary/llvm/lib/Target/targets_with_mcas.gni
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn
index b51faadbbcd07..6604ae5deff72 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn
@@ -149,6 +149,7 @@ group("X86") {
":LLVMX86CodeGen",
"AsmParser",
"Disassembler",
+ "MCA",
"MCTargetDesc",
"TargetInfo",
]
diff --git a/llvm/utils/gn/secondary/llvm/lib/Target/X86/MCA/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/X86/MCA/BUILD.gn
new file mode 100644
index 0000000000000..61ca0584dbae5
--- /dev/null
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/X86/MCA/BUILD.gn
@@ -0,0 +1,13 @@
+static_library("MCA") {
+ output_name = "LLVMTargetX86MCA"
+ deps = [
+ "//llvm/lib/MC",
+ "//llvm/lib/MC/MCParser",
+ "//llvm/lib/MCA",
+ "//llvm/lib/Target/X86/MCTargetDesc",
+ "//llvm/lib/Target/X86/TargetInfo",
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [ ".." ]
+ sources = [ "X86CustomBehaviour.cpp" ]
+}
diff --git a/llvm/utils/gn/secondary/llvm/lib/Target/targets_with_mcas.gni b/llvm/utils/gn/secondary/llvm/lib/Target/targets_with_mcas.gni
index 21d2b4f28fbbc..950393bc7be74 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/targets_with_mcas.gni
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/targets_with_mcas.gni
@@ -1,7 +1,8 @@
import("//llvm/lib/Target/targets.gni")
targets_with_mcas = []
-if (llvm_build_AMDGPU) {
- # AMDGPU is currently the only target with an MCA.
- targets_with_mcas += [ "AMDGPU" ]
+foreach(target, llvm_targets_to_build) {
+ if (target == "AMDGPU" || target == "X86") {
+ targets_with_mcas += [ target ]
+ }
}
More information about the llvm-commits
mailing list