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

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

    Leave a comment:


  • cl333r
    replied
    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.

    Leave a comment:


  • pal666
    replied
    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

    Leave a comment:


  • pal666
    replied
    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.

    Leave a comment:


  • atomsymbol
    replied
    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.

    Leave a comment:


  • moltonel
    replied
    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.

    Leave a comment:


  • moltonel
    replied
    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.

    Leave a comment:


  • atomsymbol
    replied
    Originally posted by hax0r View Post
    GNU/Linux desktop users would benefit from faster EFL binary startup and quicker shared .so library resolution.
    Is there anything beyond -fvisibility=hidden -Wl,--as-needed -Wl,-Bsymbolic-functions to further improve startup time of programs?

    Leave a comment:


  • cybertraveler
    replied
    Can Gentoo be configured to use it? Sounds like it would complement that OS perfectly.

    Leave a comment:


  • brad0
    replied
    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.
    Still wouldn't use GCC. Not worth it for the marginal "better compatibility". Operating Systems and packages don't magically build themselves.
    Last edited by brad0; 02-07-2019, 09:08 AM.

    Leave a comment:

Working...
X