blob: 3a958d2fe437247c69aaa0425d3ce8ee7ccffb61 [file] [log] [blame]
import("//llvm/tools/binutils_symlinks.gni")
import("//llvm/utils/TableGen/tablegen.gni")
import("//llvm/utils/gn/build/driver_executable.gni")
import("//llvm/utils/gn/build/symlink_or_copy.gni")
tablegen("Opts") {
visibility = [ ":llvm-rc" ]
args = [ "-gen-opt-parser-defs" ]
}
tablegen("WindresOpts") {
visibility = [ ":llvm-rc" ]
args = [ "-gen-opt-parser-defs" ]
}
symlinks = [ "llvm-windres" ]
if (llvm_install_binutils_symlinks) {
symlinks += [ "windres" ]
}
foreach(target, symlinks) {
symlink_or_copy(target) {
deps = [ ":llvm-rc" ]
source = "llvm-rc"
output = "$root_out_dir/bin/$target"
}
}
# //:llvm-rc depends on this symlink target, see comment in //BUILD.gn.
group("symlinks") {
deps = [ ":llvm-rc" ]
foreach(target, symlinks) {
deps += [ ":$target" ]
}
}
driver_executable("llvm-rc") {
deps = [
":Opts",
":WindresOpts",
"//llvm/lib/Object",
"//llvm/lib/Option",
"//llvm/lib/Support",
"//llvm/lib/TargetParser",
]
sources = [
"ResourceFileWriter.cpp",
"ResourceScriptCppFilter.cpp",
"ResourceScriptParser.cpp",
"ResourceScriptStmt.cpp",
"ResourceScriptToken.cpp",
"llvm-rc.cpp",
]
}