[llvm] 449b179 - gn build: Rebase clang-tblgen include path against root_build_dir instead of root_out_dir.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 22 14:32:43 PDT 2021
Author: Peter Collingbourne
Date: 2021-06-22T14:32:24-07:00
New Revision: 449b179902a0cf8c9e0b4d198ee37f75447eb2ff
URL: https://github.com/llvm/llvm-project/commit/449b179902a0cf8c9e0b4d198ee37f75447eb2ff
DIFF: https://github.com/llvm/llvm-project/commit/449b179902a0cf8c9e0b4d198ee37f75447eb2ff.diff
LOG: gn build: Rebase clang-tblgen include path against root_build_dir instead of root_out_dir.
Fixes clang cross-compilation.
Also remove some redundant include path arguments.
Added:
Modified:
llvm/utils/gn/secondary/clang/include/clang/Basic/BUILD.gn
llvm/utils/gn/secondary/clang/include/clang/Parse/BUILD.gn
llvm/utils/gn/secondary/clang/include/clang/Sema/BUILD.gn
llvm/utils/gn/secondary/clang/include/clang/Serialization/BUILD.gn
llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/clang/include/clang/Basic/BUILD.gn b/llvm/utils/gn/secondary/clang/include/clang/Basic/BUILD.gn
index 04e945eab49a7..6b5ab7c6fcf57 100644
--- a/llvm/utils/gn/secondary/clang/include/clang/Basic/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/include/clang/Basic/BUILD.gn
@@ -63,29 +63,17 @@ clang_tablegen("DiagnosticIndexName") {
# Attributes
clang_tablegen("AttrList") {
- args = [
- "-gen-clang-attr-list",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-list" ]
td_file = "Attr.td"
}
clang_tablegen("AttrSubMatchRulesList") {
- args = [
- "-gen-clang-attr-subject-match-rule-list",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-subject-match-rule-list" ]
td_file = "Attr.td"
}
clang_tablegen("AttrHasAttributeImpl") {
- args = [
- "-gen-clang-attr-has-attribute-impl",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-has-attribute-impl" ]
td_file = "Attr.td"
}
diff --git a/llvm/utils/gn/secondary/clang/include/clang/Parse/BUILD.gn b/llvm/utils/gn/secondary/clang/include/clang/Parse/BUILD.gn
index 24aaaeae80c8c..53ba5e62638a0 100644
--- a/llvm/utils/gn/secondary/clang/include/clang/Parse/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/include/clang/Parse/BUILD.gn
@@ -1,19 +1,11 @@
import("//clang/utils/TableGen/clang_tablegen.gni")
clang_tablegen("AttrParserStringSwitches") {
- args = [
- "-gen-clang-attr-parser-string-switches",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-parser-string-switches" ]
td_file = "../Basic/Attr.td"
}
clang_tablegen("AttrSubMatchRulesParserStringSwitches") {
- args = [
- "-gen-clang-attr-subject-match-rules-parser-string-switches",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-subject-match-rules-parser-string-switches" ]
td_file = "../Basic/Attr.td"
}
diff --git a/llvm/utils/gn/secondary/clang/include/clang/Sema/BUILD.gn b/llvm/utils/gn/secondary/clang/include/clang/Sema/BUILD.gn
index 1f41189e8abb5..097bcce490380 100644
--- a/llvm/utils/gn/secondary/clang/include/clang/Sema/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/include/clang/Sema/BUILD.gn
@@ -1,46 +1,26 @@
import("//clang/utils/TableGen/clang_tablegen.gni")
clang_tablegen("AttrTemplateInstantiate") {
- args = [
- "-gen-clang-attr-template-instantiate",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-template-instantiate" ]
td_file = "../Basic/Attr.td"
}
clang_tablegen("AttrParsedAttrList") {
- args = [
- "-gen-clang-attr-parsed-attr-list",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-parsed-attr-list" ]
td_file = "../Basic/Attr.td"
}
clang_tablegen("AttrParsedAttrKinds") {
- args = [
- "-gen-clang-attr-parsed-attr-kinds",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-parsed-attr-kinds" ]
td_file = "../Basic/Attr.td"
}
clang_tablegen("AttrSpellingListIndex") {
- args = [
- "-gen-clang-attr-spelling-index",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-spelling-index" ]
td_file = "../Basic/Attr.td"
}
clang_tablegen("AttrParsedAttrImpl") {
- args = [
- "-gen-clang-attr-parsed-attr-impl",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-parsed-attr-impl" ]
td_file = "../Basic/Attr.td"
}
diff --git a/llvm/utils/gn/secondary/clang/include/clang/Serialization/BUILD.gn b/llvm/utils/gn/secondary/clang/include/clang/Serialization/BUILD.gn
index bf90e0667c926..e221de0a74c6d 100644
--- a/llvm/utils/gn/secondary/clang/include/clang/Serialization/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/include/clang/Serialization/BUILD.gn
@@ -1,19 +1,11 @@
import("//clang/utils/TableGen/clang_tablegen.gni")
clang_tablegen("AttrPCHRead") {
- args = [
- "-gen-clang-attr-pch-read",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-pch-read" ]
td_file = "../Basic/Attr.td"
}
clang_tablegen("AttrPCHWrite") {
- args = [
- "-gen-clang-attr-pch-write",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-pch-write" ]
td_file = "../Basic/Attr.td"
}
diff --git a/llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni b/llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
index 4dd28ff1e60ba..675f640716903 100644
--- a/llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
+++ b/llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
@@ -36,7 +36,7 @@ template("clang_tablegen") {
args = [
"-I",
- rebase_path("//clang/include", root_out_dir),
+ rebase_path("//clang/include", root_build_dir),
] + invoker.args
tblgen_target = "//clang/utils/TableGen:clang-tblgen"
}
More information about the llvm-commits
mailing list