Announcement
Collapse
No announcement yet.
Mold 1.0 Released As A Modern High-Speed Linker Alternative To GNU Gold, LLVM LLD
Collapse
X
-
Originally posted by cl333r View PostDoes the linker play a role in app startup time? I mean is it "linking" anything when the OS is executing an application or only during compilation time?
- Likes 1
Comment
-
i can only welcome development of fast linker and usage of c++20. but its claims need grain of salt. most of its speedup comes from multithreading which only works for last job in build. and it doesn't support make jobserver, i.e. it will happily run 100 linkers each using 100 cores on 100 core machine during parallel build with many links. also it overwrites binaries in place(instead of create new + rename) if open for writing succeeds. well, open fails only for running executables, but not for their libraries, overwriting used library will certainly crash running executables using it.
- Likes 4
Comment
-
Originally posted by pal666 View Postno, it's running optimization passes in the compiler.
llvm didn't have any linker at all when gcc already had lto, so you should check gcc docs
In fact, if you are using thinLTO (a parallelised LTO invented by llvm), it will not work unless “-fuse-ld=lld” is passed to clang so that it will use lld instead of the default gold ld installed on your system.
Comment
-
Originally posted by carewolf View Post
Yeah, the compiler run in the linker. In other words done by the compiler. And it is optimizations, but mainly it is compilation. Turning intermediate code into binary code.
LLVM basically build libLLVM.so as a dynamic library and linked the lld against it so that they can use the optimization passes and codegen passes from it.
Comment
-
Originally posted by pal666 View Post... also it overwrites binaries in place(instead of create new + rename) if open for writing succeeds. well, open fails only for running executables, but not for their libraries, overwriting used library will certainly crash running executables using it.
- Likes 1
Comment
-
Originally posted by brad0 View Post
So, still a ways to go to be a replacement for LLD.
Then for release you'd switch to one of the existing linkers.
Comment
Comment