[all-commits] [llvm/llvm-project] 80ce17: [gn build] Always make symlinks target explicitly ...

Nico Weber via All-commits all-commits at lists.llvm.org
Mon Apr 4 06:54:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 80ce17e3d477a92846be37866cde937e03cb55ac
      https://github.com/llvm/llvm-project/commit/80ce17e3d477a92846be37866cde937e03cb55ac
  Author: Nico Weber <thakis at chromium.org>
  Date:   2022-04-04 (Mon, 04 Apr 2022)

  Changed paths:
    M llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn
    M llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-ar/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-objcopy/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-readobj/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn

  Log Message:
  -----------
  [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 b0abada8fe7e
   are introduced by copy-pasting an existing symlink target and then
   not being careful enough when tweaking it.

No behavior change.




More information about the All-commits mailing list