Interested in how libraries impact an app’s size & performance? And what you can do to improve it? Meet mergeable libraries in this #WWDC23 session!
https://t.co/CuPCD4ob5J
@ElliottZ@rui314 The new linker has different optimization levels compared to ld64. `-O0` for debug, and `-O` for release. `clang` and swift will pass the correct values down to the linker starting Xcode 15 beta 1. Other build systems/compilers will need to pass `-O0` in debug correctly.
@davidecci When Venkatadri Seshadri and I presented on concurrent compilation in 1987 at IFIP/Distributed Processing, there was very little published. We focussed on low-hanging fruit at the front-end of the pipeline. Wonderful to see concurrency make it all the way through to the linker.
For folks interested in using mergeable libraries, the following documentation should help to get you started: https://t.co/EAwyrE4fcy
Join the labs to provide feedback and ask questions!
Hope everyone enjoyed the SOTU presentation! We have an brand new linker this year, and some really cool new features like mergeable libraries. There is a session on Wednesday, and team members will be in labs throughout the week. https://t.co/S8adswHgXN #WWDC23
What's even more thrilling is observing that, despite linkers and loaders having a long history, there is still ample potential for advancing the state of the art in this field.
I consider myself fortunate enough to have had the opportunity to support these two projects, both of which were successfully developed by an exceptional small team of individuals.
My team also worked on a new library format: mergeable libraries. Mergeable libraries combine the benefits of static and dynamic libraries, providing the best performance without sacrificing development velocity. (1/n)
In development, mergeable libraries act like “regular” dylibs, for maximum development productivity. In release, the linker can use the extra metadata to merge multiple libraries together and perform the kind of optimizations that would happen in a static library build.
My team also worked on a new library format: mergeable libraries. Mergeable libraries combine the benefits of static and dynamic libraries, providing the best performance without sacrificing development velocity. (1/n)
Today at WWDC we introduced a new static linker. It is a ground-up rewrite that’s up to 5x faster than ld64. The new linker is written with multicore in mind, and it’s the first production ready parallel linker officially supported for iOS development. (1/n)
Mergeable libraries are dynamic libraries plus metadata that allow the static linker to perform a relinking step. At the core lies the concept that the metadata hold sufficient information to reconstruct the original object files.