News for hackers. Stuff that matters.
Re:Using the mold linker for fun and 3x-8x link time speedups by ur-whale on Friday June 03, 2022 @02:54AM (#31605066)
Using all cores to link is a very welcome change to the linker world.

I wish blender folks would try to switch to mold, linking Blender is the singler biggest bottleneck to dev speed when writing Blender code.

Re:Using the mold linker for fun and 3x-8x link time speedups by rui314 on Friday June 03, 2022 @03:36AM (#31605336)
It looks like you can already use mold to build blender.

https://github.com/blender/blender/commit/8b3d798374a2c6b502...

Re:Using the mold linker for fun and 3x-8x link time speedups by Rucadi on Friday June 03, 2022 @03:35AM (#31605330)
Is it not a drop-in replacement?
Re:Using the mold linker for fun and 3x-8x link time speedups by rui314 on Friday June 03, 2022 @03:49AM (#31605434)
It's a drop-in replacement, but you still have to tell the build system to have it use an alternative linker instead of the default one, unless you replace /usr/bin/ld with mold entirely.
Re:Using the mold linker for fun and 3x-8x link time speedups by r-r-r on Friday June 03, 2022 @04:10AM (#31605578)
Rui, thank you! mold is a life saver! My compile debug cycle improved a lot since I started using it!

(I tend to prefix PATH with the folder I build it into for the specific project I need it for)

Re:Using the mold linker for fun and 3x-8x link time speedups by r-r-r on Friday June 03, 2022 @04:06AM (#31605549)
It got to 1.0 recently and still is in dev.

But off the top - No lto support, missing some flags that we use when building drivers, valgrind (cachegrind etc) fail to load symbols, some linker stuff is case senstive etc.

Can also add it to PATH, instead of hardcoding it like op did here.

But it's well worth it in some projects - In my case it shaved over a minute from incremental builds, resulting in sub 10 second builds!

(Alsp note you can cache indexes in gdb by default)

Re:Using the mold linker for fun and 3x-8x link time speedups by rui314 on Friday June 03, 2022 @04:15AM (#31605613)
It's improving pretty quickly. Now it got LTO support, and I also believe that Valgrind issue has been resolved.
Re:Using the mold linker for fun and 3x-8x link time speedups by r-r-r on Friday June 03, 2022 @04:37AM (#31605752)
Oh great! I'll fetch and try a new build, Thank you! :)