Announcement

Collapse
No announcement yet.

There's A Proposal For Making Clang Default To LLVM LLD As The Linker

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • There's A Proposal For Making Clang Default To LLVM LLD As The Linker

    Phoronix: There's A Proposal For Making Clang Default To LLVM LLD As The Linker

    Nothing is set in stone yet but since Friday there's been an active discussion on the LLVM mailing list about having Clang default to LLVM's LLD sub-project linker...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    are they serious ? the damn thing does not even ship in any distribution

    Comment


    • #3
      Originally posted by doom_Oo7 View Post
      are they serious ? the damn thing does not even ship in any distribution
      Originally posted by Renato Golin via llvm-dev
      My reason is that, if you just build Clang, with or without LLD, everything works out of the box as you expect: Former uses LLD, latter uses the system's linker.
      So no problem if a distro does not ship it, it would default to the system's linker then.

      Comment


      • #4
        So how much is left for an LLVM replacement of binutils?
        lld :: ld /gold
        llvm-mc :: as
        llvm-ar :: ar
        llvm-nm :: nm
        llvm-readobj
        llvm-objdump

        other projects? There was(?) the elftoolchain project (https://sourceforge.net/p/elftoolchain/wiki/Home/) for binutils replacement in FreeBSD but a project integrated in LLVM might be more interesting

        Some things that might be interesting to know later is whether lld will work for the llvmlinux project in order to make a completely LLVM-based linux distro (there was for example an interesting GSOC project 2016 on making a musl/clang/libc++ gentoo).

        Alternative linkers at least used to be a problem for the kernel (does gold work nowadays?).

        Comment


        • #5
          What could possible go wrong?

          Well basically everything.

          Comment


          • #6
            Originally posted by sirblackheart View Post
            So no problem if a distro does not ship it, it would default to the system's linker then.
            What I meant is that it is far from having received the level of testing of GNU ld or ld.gold since it is not easily available (not even in an AUR package or a PPA!). I wanted to try it out multiple times on my software but for now you have to build it along the LLVM source tree, which takes ages.

            Comment


            • #7
              Well, if lld is getting used by default, it will get more testing.
              also, detecting and using the correct binutils version and variant is still some weird hard-coded magic that can fail in various horrible ways if you have multiple cross-toolchain installed. using lld could easy things up alot (won't know, haven't tried it yet)

              Comment


              • #8
                Originally posted by doom_Oo7 View Post

                What I meant is that it is far from having received the level of testing of GNU ld or ld.gold since it is not easily available (not even in an AUR package or a PPA!). I wanted to try it out multiple times on my software but for now you have to build it along the LLVM source tree, which takes ages.
                Build it and test it. They wouldn't be talking about incorporating it if it weren't mature. In short, they've tested it widely, across enterprises in controlled networks extensively. The amount of times LD has been a POS from GNU over the years still hasn't stopped everyone from using it: mainly I suspect due to the fact the FOSS community is screwed without it.

                Comment

                Working...
                X