Currently the legacy linker expects .o object files. I think we should switch it to .a files.
A .a is just an archive that contains one of more .o files. It is strictly more flexible.
This comes up for example when you have a platform that depends on a static lib. You can move the platform .o and the static library .a file into a single larger .a file. That puts all dependencies into a single distributable file.
To generate a .a from a .o is just a matter of calling ar and most compilers probably can generate the .a directly.
If wanted, we could leave in a fallback check to use the .o file if the .a doesn't exist.
Thoughts?
I don't have strong feelings, other than generally wanting to drop the legacy linker as soon as we can :big_smile:
That's fair, but I think this will enable some interesting platforms. For example, @Luke Boswell is messing with statically linking SDL2, where this came up.
Seems trivial enough to fix that it is worth just quickly patching.
Yes please. It would be really useful to be able to package SDL2 and users not have to have the dylib already installed on their system. So just roc run myApp.roc and everything just works.
works for me! :thumbs_up:
Also, I think I'll leave it as .o as fallback to avoid any need to update existing platforms.
Last updated: Jun 16 2026 at 16:19 UTC