[all-commits] [llvm/llvm-project] 06d6b1: [Driver] Gnu.cpp: remove unneeded -L lib/gcc/$trip...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Mar 20 18:50:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 06d6b1471eb809aaad0681e1eb88727ac8225d47
      https://github.com/llvm/llvm-project/commit/06d6b1471eb809aaad0681e1eb88727ac8225d47
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-03-20 (Sat, 20 Mar 2021)

  Changed paths:
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M clang/test/Driver/linux-ld.c
    M clang/test/Driver/mips-reduced-toolchain.cpp

  Log Message:
  -----------
  [Driver] Gnu.cpp: remove unneeded -L lib/gcc/$triple/$version/../../../$triple

After path resolution, it duplicates a subsequent -L entry. The entry below
(lib/gcc/$triple/$version/../../../../$OSLibDir) usually does not exist (e.g.
Arch Linux; Debian cross gcc). When it exists, it typically just has ld.so (e.g.
Debian native gcc) which cannot cause collision. Removing the -L (similar to
reordering it) is therefore justified.




More information about the All-commits mailing list