[PATCH] D56575: gn build: Create a variable for the host toolchain and start using it in the tblgen template.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 10 21:35:20 PST 2019
pcc created this revision.
pcc added reviewers: thakis, phosek.
Repository:
rL LLVM
https://reviews.llvm.org/D56575
Files:
llvm/utils/gn/build/BUILDCONFIG.gn
llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni
Index: llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni
===================================================================
--- llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni
+++ llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni
@@ -39,9 +39,9 @@
if (defined(invoker.tblgen_target)) {
tblgen_target = invoker.tblgen_target
} else {
- # FIXME: In cross builds, this should depend on the host binary.
tblgen_target = "//llvm/utils/TableGen:llvm-tblgen"
}
+ tblgen_target += "($host_toolchain)"
tblgen_executable = get_label_info(tblgen_target, "root_out_dir") +
"/bin/" + get_label_info(tblgen_target, "name")
deps = [
Index: llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
===================================================================
--- llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
+++ llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
@@ -35,7 +35,6 @@
"visibility",
])
- # FIXME: In cross builds, this should depend on the host binary.
tblgen_target = "//clang/utils/TableGen:clang-tblgen"
}
}
Index: llvm/utils/gn/build/BUILDCONFIG.gn
===================================================================
--- llvm/utils/gn/build/BUILDCONFIG.gn
+++ llvm/utils/gn/build/BUILDCONFIG.gn
@@ -26,7 +26,9 @@
}
if (host_os == "win") {
- set_default_toolchain("//llvm/utils/gn/build/toolchain:win")
+ host_toolchain = "//llvm/utils/gn/build/toolchain:win"
} else {
- set_default_toolchain("//llvm/utils/gn/build/toolchain:unix")
+ host_toolchain = "//llvm/utils/gn/build/toolchain:unix"
}
+
+set_default_toolchain(host_toolchain)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56575.181206.patch
Type: text/x-patch
Size: 1757 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190111/3f975737/attachment.bin>
More information about the llvm-commits
mailing list