[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
Fri Jan 11 11:57:09 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350964: gn build: Create a variable for the host toolchain and start using it in theā¦ (authored by pcc, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D56575?vs=181206&id=181345#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56575/new/
https://reviews.llvm.org/D56575
Files:
llvm/trunk/utils/gn/build/BUILDCONFIG.gn
llvm/trunk/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
llvm/trunk/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni
Index: llvm/trunk/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni
===================================================================
--- llvm/trunk/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni
+++ llvm/trunk/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/trunk/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
===================================================================
--- llvm/trunk/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
+++ llvm/trunk/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/trunk/utils/gn/build/BUILDCONFIG.gn
===================================================================
--- llvm/trunk/utils/gn/build/BUILDCONFIG.gn
+++ llvm/trunk/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.181345.patch
Type: text/x-patch
Size: 1811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190111/5c355887/attachment.bin>
More information about the llvm-commits
mailing list