[gn build] Always make symlinks target explicitly depend on base binary

This is a no-op in these files since the symlinks array is never empty
and the dependency to the base binary is added through the loop in these
cases.

But adding them doesn't hurt either, and it:
1. Makes all symlinks targets look the same, independent of symlinks
   are created always or just conditionally based on gn args
2. Makes it less likely that bugs like the one fixed by b0abada8fe
   are introduced by copy-pasting an existing symlink target and then
   not being careful enough when tweaking it.

No behavior change.
This commit is contained in:
Nico Weber 2022-04-04 09:23:15 -04:00
parent ed020808d7
commit 80ce17e3d4
6 changed files with 6 additions and 6 deletions

View File

@ -27,7 +27,7 @@ foreach(target, symlinks) {
# //:clang depends on this symlink target, see comment in //BUILD.gn.
group("symlinks") {
deps = []
deps = [ ":clang" ]
foreach(target, symlinks) {
deps += [ ":${target[0]}" ]
}

View File

@ -16,7 +16,7 @@ foreach(target, symlinks) {
# //:lld depends on this symlink target, see comment in //BUILD.gn.
group("symlinks") {
deps = []
deps = [ ":lld" ]
foreach(target, symlinks) {
deps += [ ":$target" ]
}

View File

@ -23,7 +23,7 @@ foreach(target, symlinks) {
# //:llvm-ar depends on this symlink target, see comment in //BUILD.gn.
group("symlinks") {
deps = []
deps = [ ":llvm-ar" ]
foreach(target, symlinks) {
deps += [ ":$target" ]
}

View File

@ -50,7 +50,7 @@ foreach(target, symlinks) {
# //:llvm-objcopy depends on this symlink target, see comment in //BUILD.gn.
group("symlinks") {
deps = []
deps = [ ":llvm-objcopy" ]
foreach(target, symlinks) {
deps += [ ":$target" ]
}

View File

@ -21,7 +21,7 @@ foreach(target, symlinks) {
# //:llvm-readobj depends on this symlink target, see comment in //BUILD.gn.
group("symlinks") {
deps = []
deps = [ ":llvm-readobj" ]
foreach(target, symlinks) {
deps += [ ":$target" ]
}

View File

@ -21,7 +21,7 @@ foreach(target, symlinks) {
# //:llvm-symbolizer depends on this symlink target, see comment in //BUILD.gn.
group("symlinks") {
deps = []
deps = [ ":llvm-symbolizer" ]
foreach(target, symlinks) {
deps += [ ":$target" ]
}