Announcement

Collapse
No announcement yet.

A Detailed Look At The Speed Advantages To LLVM's LLD Linker

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

  • #11
    Originally posted by hax0r View Post
    Is there any improvement in runtime performance? No. Spending little extra time during linking process is non issue, majority of endusers don't compile their software. GNU/Linux desktop users would benefit from faster EFL binary startup and quicker shared .so library resolution. GCC still offers better compatibility, produces faster and much smaller binaries e.g in firefox case.
    There's pretty much no runtime performance difference to using Gnu's LD vs LLD vs Gold. Linking is orthogonal to compiling: you can compile with GCC and link with LLD, or any other combination. Compiling can be highly parallelized (using more cores and even more machines), but linking remains a singular step.

    So go ahead and use the compiler that produces faster code for a particular codebase (that's sometimes GCC, sometimes LLVM, usually negligible) and use the faster linker to speed up your development process and therefore make the software better faster.

    Linking Firefox takes around 15min with LLD on my machine, I don't even want to try linking with LD. Waiting for a build is a huge developer productivity killer.

    Comment


    • #12
      Originally posted by cybertraveler View Post
      Can Gentoo be configured to use it? Sounds like it would complement that OS perfectly.
      Yes. The user can set the default CC, LD, CFLAGS, and LDFLAGS for your system, or specific setting for specific packages. Also, some packages (like firefox) have a USE flag to build with a different compiler and/or linker, with even less effort.

      Comment


      • #13
        Originally posted by moltonel View Post
        Yes. The user can set the default CC, LD, CFLAGS, and LDFLAGS for your system, or specific setting for specific packages. Also, some packages (like firefox) have a USE flag to build with a different compiler and/or linker, with even less effort.
        Just added -fuse-ld=gold -Wl,--threads to LDFLAGS in make.conf.

        Comment


        • #14
          Originally posted by cl333r View Post
          I'm not sure I believe it because the author seems to be a GCC dev
          so you didn't believe any llvm devs claims?
          Originally posted by cl333r View Post
          would be great if a LLVM dev commented on that.
          hard to imagine llvm devs jumping in with "yes, we suck"
          Originally posted by cl333r View Post
          Though being a C++ dev I totally like LLVM a lot better than g++.
          because you are macos user stuck with 10+ year old gcc?
          Last edited by pal666; 02-08-2019, 07:39 AM.

          Comment


          • #15
            Originally posted by atomsymbol View Post
            -fvisibility=hidden
            this usually requires changes to source code. like adding export macros to public symbols
            Originally posted by atomsymbol View Post
            -Wl,-Bsymbolic-functions
            if you want to break elf symbol interposition, there is -fno-semantic-interposition

            Comment


            • #16
              Originally posted by pal666 View Post
              so you didn't believe any llvm devs claims?
              hard to imagine llvm devs jumping in with "yes, we suck"

              because you are macos user stuck with 10+ year old gcc?
              You're clueless and I'm not a mac user.

              Comment


              • #17
                Originally posted by cl333r View Post
                I'm not a mac user.
                windows?

                Comment

                Working...
                X