1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[gn build] (manually) port f8de9aaef2f4

This commit is contained in:
Nico Weber 2021-04-26 16:03:50 -04:00
parent de1b48ff21
commit 7195ece044
3 changed files with 34 additions and 1 deletions

View File

@ -76,6 +76,9 @@ group("llvm-objcopy") {
group("llvm-objdump") { group("llvm-objdump") {
deps = [ "//llvm/tools/llvm-objdump:symlinks" ] deps = [ "//llvm/tools/llvm-objdump:symlinks" ]
} }
group("llvm-rc") {
deps = [ "//llvm/tools/llvm-rc:symlinks" ]
}
group("llvm-readobj") { group("llvm-readobj") {
deps = [ "//llvm/tools/llvm-readobj:symlinks" ] deps = [ "//llvm/tools/llvm-readobj:symlinks" ]
} }

View File

@ -256,7 +256,7 @@ group("test") {
"//llvm/tools/llvm-pdbutil", "//llvm/tools/llvm-pdbutil",
"//llvm/tools/llvm-profdata", "//llvm/tools/llvm-profdata",
"//llvm/tools/llvm-profgen", "//llvm/tools/llvm-profgen",
"//llvm/tools/llvm-rc", "//llvm/tools/llvm-rc:symlinks",
"//llvm/tools/llvm-readobj:symlinks", "//llvm/tools/llvm-readobj:symlinks",
"//llvm/tools/llvm-reduce", "//llvm/tools/llvm-reduce",
"//llvm/tools/llvm-rtdyld", "//llvm/tools/llvm-rtdyld",

View File

@ -1,13 +1,43 @@
import("//llvm/tools/binutils_symlinks.gni")
import("//llvm/utils/TableGen/tablegen.gni") import("//llvm/utils/TableGen/tablegen.gni")
import("//llvm/utils/gn/build/symlink_or_copy.gni")
tablegen("Opts") { tablegen("Opts") {
visibility = [ ":llvm-rc" ] visibility = [ ":llvm-rc" ]
args = [ "-gen-opt-parser-defs" ] 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" ]
}
}
executable("llvm-rc") { executable("llvm-rc") {
deps = [ deps = [
":Opts", ":Opts",
":WindresOpts",
"//llvm/lib/Object",
"//llvm/lib/Option", "//llvm/lib/Option",
"//llvm/lib/Support", "//llvm/lib/Support",
] ]