[llvm] 5337cd8 - [gn build] Fix tblgen CodeGen dependencies
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Thu May 4 11:19:44 PDT 2023
Author: Arthur Eubanks
Date: 2023-05-04T11:18:55-07:00
New Revision: 5337cd897fecf52f6d4ca45f85e9b68bc48af2c9
URL: https://github.com/llvm/llvm-project/commit/5337cd897fecf52f6d4ca45f85e9b68bc48af2c9
DIFF: https://github.com/llvm/llvm-project/commit/5337cd897fecf52f6d4ca45f85e9b68bc48af2c9.diff
LOG: [gn build] Fix tblgen CodeGen dependencies
Matches the CMake build, otherwise we're rebuilding tblgen (and everything else) when there's a change almost anywhere in LLVM.
Added:
Modified:
llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
llvm/utils/gn/secondary/llvm/utils/TableGen/GlobalISel/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
index 3ffdc9590eee0..e13650d160f45 100644
--- a/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
@@ -1,3 +1,18 @@
+static_library("CodeGenTypes") {
+ output_name = "LLVMCodeGenType"
+ public_deps = [
+ # Must be a public_dep because CodeGen's headers include llvm-config.h.
+ "//llvm/include/llvm/Config:llvm-config",
+ ]
+ deps = [
+ "//llvm/include/llvm/CodeGen:GenVT",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "LowLevelType.cpp"
+ ]
+}
+
static_library("CodeGen") {
output_name = "LLVMCodeGen"
public_deps = [
diff --git a/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn b/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
index 751e237183982..e0ed14f7c1ca0 100644
--- a/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
@@ -24,7 +24,7 @@ executable("llvm-tblgen") {
deps = [
":llvm-min-tblgen-sources",
"//llvm/include/llvm/Config:llvm-config",
- "//llvm/lib/CodeGen",
+ "//llvm/lib/CodeGen:CodeGenTypes",
"//llvm/lib/Support",
"//llvm/lib/TableGen",
"//llvm/utils/TableGen/GlobalISel",
diff --git a/llvm/utils/gn/secondary/llvm/utils/TableGen/GlobalISel/BUILD.gn b/llvm/utils/gn/secondary/llvm/utils/TableGen/GlobalISel/BUILD.gn
index 49100d9fbe4e8..27a425b86d78a 100644
--- a/llvm/utils/gn/secondary/llvm/utils/TableGen/GlobalISel/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/utils/TableGen/GlobalISel/BUILD.gn
@@ -1,8 +1,7 @@
static_library("GlobalISel") {
deps = [
"//llvm/include/llvm/CodeGen:GenVT",
- "//llvm/lib/CodeGen",
- "//llvm/lib/CodeGen",
+ "//llvm/lib/CodeGen:CodeGenTypes",
"//llvm/lib/Support",
]
sources = [
More information about the llvm-commits
mailing list