[llvm] 711814a - [gn build] port 47afaf2eb02b (exegesis all targets)
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 10:17:15 PDT 2022
Author: Nico Weber
Date: 2022-09-22T13:17:05-04:00
New Revision: 711814a6520d6e5b26ff7abf879005c9fbbdbe5c
URL: https://github.com/llvm/llvm-project/commit/711814a6520d6e5b26ff7abf879005c9fbbdbe5c
DIFF: https://github.com/llvm/llvm-project/commit/711814a6520d6e5b26ff7abf879005c9fbbdbe5c.diff
LOG: [gn build] port 47afaf2eb02b (exegesis all targets)
Added:
llvm/utils/gn/secondary/llvm/lib/Target/targets_with_exegesis.gni
Modified:
llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/BUILD.gn
llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/BUILD.gn
Removed:
################################################################################
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 7d6eebb26a18e..aa226ddfe452b 100644
--- a/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
@@ -2,6 +2,7 @@ import("//llvm/lib/DebugInfo/PDB/enable_dia.gni")
import("//llvm/lib/Target/targets.gni")
import("//llvm/lib/Target/targets_with_asm_parsers.gni")
import("//llvm/lib/Target/targets_with_disassemblers.gni")
+import("//llvm/lib/Target/targets_with_exegesis.gni")
import("//llvm/lib/Target/targets_with_mcas.gni")
import("//llvm/triples.gni")
import("//llvm/utils/gn/build/buildflags.gni")
@@ -471,6 +472,12 @@ write_target_def_file("TargetMCAs.def") {
all_targets = targets_with_mcas
}
+write_target_def_file("TargetExegesis.def") {
+ key = "LLVM_ENUM_EXEGESIS"
+ value = "LLVM_EXEGESIS"
+ all_targets = targets_with_exegesis
+}
+
group("write_target_def_files") {
visibility = [
"//llvm/lib/Support",
@@ -480,6 +487,7 @@ group("write_target_def_files") {
":AsmParsers.def",
":AsmPrinters.def",
":Disassemblers.def",
+ ":TargetExegesis.def",
":TargetMCAs.def",
":Targets.def",
]
diff --git a/llvm/utils/gn/secondary/llvm/lib/Target/targets_with_exegesis.gni b/llvm/utils/gn/secondary/llvm/lib/Target/targets_with_exegesis.gni
new file mode 100644
index 0000000000000..9d75f33b3be67
--- /dev/null
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/targets_with_exegesis.gni
@@ -0,0 +1,9 @@
+import("//llvm/lib/Target/targets.gni")
+
+targets_with_exegesis = []
+foreach(target, llvm_targets_to_build) {
+ if (target == "AArch64" || target == "Mips" || target == "PowerPC" ||
+ target == "X86") {
+ targets_with_exegesis += [ target ]
+ }
+}
diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/BUILD.gn
index d3a478eea32d4..d76453749fd39 100644
--- a/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/BUILD.gn
@@ -16,7 +16,4 @@ executable("llvm-exegesis") {
"//llvm/lib/Target:AllTargetsInfos",
]
sources = [ "llvm-exegesis.cpp" ]
-
- defines = [ "LLVM_EXEGESIS_INITIALIZE_NATIVE_TARGET=" +
- "Initialize${native_target}ExegesisTarget" ]
}
diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/BUILD.gn
index 23a73427e68ef..a704ebae5e239 100644
--- a/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/BUILD.gn
@@ -1,4 +1,5 @@
import("//llvm/lib/Target/targets.gni")
+import("//llvm/lib/Target/targets_with_exegesis.gni")
static_library("lib") {
output_name = "LLVMExegesis"
@@ -38,13 +39,5 @@ static_library("lib") {
"UopsBenchmarkRunner.cpp",
]
- if (llvm_build_AArch64) {
- deps += [ "AArch64" ]
- }
- if (llvm_build_PowerPC) {
- deps += [ "PowerPC" ]
- }
- if (llvm_build_X86) {
- deps += [ "X86" ]
- }
+ deps += targets_with_exegesis
}
More information about the llvm-commits
mailing list