[all-commits] [llvm/llvm-project] e16c0a: clang+lld: Improve clang+ld.darwinnew.lld interact...

Nico Weber via All-commits all-commits at lists.llvm.org
Tue Nov 24 05:52:26 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e16c0a9a689719f379e49d0a05cb58774cce4adb
      https://github.com/llvm/llvm-project/commit/e16c0a9a689719f379e49d0a05cb58774cce4adb
  Author: Nico Weber <thakis at chromium.org>
  Date:   2020-11-24 (Tue, 24 Nov 2020)

  Changed paths:
    M clang/include/clang/Driver/ToolChain.h
    M clang/lib/Driver/ToolChain.cpp
    M clang/lib/Driver/ToolChains/Darwin.cpp
    M clang/lib/Driver/ToolChains/Darwin.h
    A clang/test/Driver/darwin-ld-demangle-lld.c
    M lld/Common/Strings.cpp
    M lld/MachO/Config.h
    M lld/MachO/Driver.cpp
    M lld/MachO/Options.td
    M lld/MachO/Symbols.cpp
    M lld/MachO/Writer.cpp
    M lld/test/ELF/undef.s
    A lld/test/MachO/demangle.s
    M lld/test/MachO/silent-ignore.test
    M lld/tools/lld/CMakeLists.txt
    M llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn

  Log Message:
  -----------
  clang+lld: Improve clang+ld.darwinnew.lld interaction, pass -demangle

This patch:
- adds an ld64.lld.darwinnew symlink for lld, to go with f2710d4b576,
  so that `clang -fuse-ld=lld.darwinnew` can be used to test new
  Mach-O lld while it's in bring-up. (The expectation is that we'll
  remove this again once new Mach-O lld is the defauld and only Mach-O
  lld.)
- lets the clang driver know if the linker is lld (currently
  only triggered if `-fuse-ld=lld` or `-fuse-ld=lld.darwinnew` is
  passed). Currently only used for the next point, but could be used
  to implement other features that need close coordination between
  compiler and linker, e.g. having a diag for calling `clang++` instead
  of `clang` when link errors are caused by a missing C++ stdlib.
- lets the clang driver pass `-demangle` to Mach-O lld (both old and
  new), in addition to ld64
- implements -demangle for new Mach-O lld
- changes demangleItanium() to accept _Z, __Z, ___Z, ____Z prefixes
  (and updates one test added in D68014). Mach-O has an extra
  underscore for symbols, and the three (or, on Mach-O, four)
  underscores are used for block names.

Differential Revision: https://reviews.llvm.org/D91884




More information about the All-commits mailing list