diff --git a/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/llvm/utils/gn/secondary/llvm/test/BUILD.gn index 25e8ca43e35f..c8871e0400b3 100644 --- a/llvm/utils/gn/secondary/llvm/test/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/test/BUILD.gn @@ -227,7 +227,7 @@ group("test") { "//llvm/tools/llvm-size", "//llvm/tools/llvm-split", "//llvm/tools/llvm-strings", - "//llvm/tools/llvm-symbolizer", + "//llvm/tools/llvm-symbolizer:symlinks", "//llvm/tools/llvm-undname", "//llvm/tools/llvm-xray", "//llvm/tools/lto", diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-objdump/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-objdump/BUILD.gn index e567a70d0a8b..2b1b0917e760 100644 --- a/llvm/utils/gn/secondary/llvm/tools/llvm-objdump/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/tools/llvm-objdump/BUILD.gn @@ -11,7 +11,7 @@ if (llvm_install_binutils_symlinks) { } } -# //:llvm-nm depends on this symlink target, see comment in //BUILD.gn. +# //:llvm-objdump depends on this symlink target, see comment in //BUILD.gn. group("symlinks") { deps = [ ":llvm-objdump", diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn index 497d2c8284be..34e4e41b9c81 100644 --- a/llvm/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn @@ -1,23 +1,25 @@ import("//llvm/tools/binutils_symlinks.gni") import("//llvm/utils/gn/build/symlink_or_copy.gni") +symlinks = [ "llvm-addr2line" ] if (llvm_install_binutils_symlinks) { - symlink_or_copy("addr2line") { + symlinks += [ "addr2line" ] +} +foreach(target, symlinks) { + symlink_or_copy(target) { deps = [ ":llvm-symbolizer", ] source = "llvm-symbolizer" - output = "$root_out_dir/bin/addr2line" + output = "$root_out_dir/bin/$target" } } # //:llvm-symbolizer depends on this symlink target, see comment in //BUILD.gn. group("symlinks") { - deps = [ - ":llvm-symbolizer", - ] - if (llvm_install_binutils_symlinks) { - deps += [ ":addr2line" ] + deps = [] + foreach(target, symlinks) { + deps += [ ":$target" ] } }