[llvm] r350964 - gn build: Create a variable for the host toolchain and start using it in the tblgen template.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 11 11:53:07 PST 2019
Author: pcc
Date: Fri Jan 11 11:53:06 2019
New Revision: 350964
URL: http://llvm.org/viewvc/llvm-project?rev=350964&view=rev
Log:
gn build: Create a variable for the host toolchain and start using it in the tblgen template.
Differential Revision: https://reviews.llvm.org/D56575
Modified:
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
Modified: llvm/trunk/utils/gn/build/BUILDCONFIG.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/build/BUILDCONFIG.gn?rev=350964&r1=350963&r2=350964&view=diff
==============================================================================
--- llvm/trunk/utils/gn/build/BUILDCONFIG.gn (original)
+++ llvm/trunk/utils/gn/build/BUILDCONFIG.gn Fri Jan 11 11:53:06 2019
@@ -26,7 +26,9 @@ set_defaults("source_set") {
}
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)
Modified: llvm/trunk/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni?rev=350964&r1=350963&r2=350964&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni (original)
+++ llvm/trunk/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni Fri Jan 11 11:53:06 2019
@@ -35,7 +35,6 @@ template("clang_tablegen") {
"visibility",
])
- # FIXME: In cross builds, this should depend on the host binary.
tblgen_target = "//clang/utils/TableGen:clang-tblgen"
}
}
Modified: llvm/trunk/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni?rev=350964&r1=350963&r2=350964&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni (original)
+++ llvm/trunk/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni Fri Jan 11 11:53:06 2019
@@ -39,9 +39,9 @@ template("tablegen") {
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 = [
More information about the llvm-commits
mailing list