forked from OSchip/llvm-project
gn build: Create a variable for the host toolchain and start using it in the tblgen template.
Differential Revision: https://reviews.llvm.org/D56575 llvm-svn: 350964
This commit is contained in:
parent
17ee5a2d80
commit
fe44363f0d
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 = [
|
||||
|
|
Loading…
Reference in New Issue