I think it was missing the -shared flag - fixed now, but I didn't test it yet.

Library targets and building in general are still quite simplistic and will get some big improvements at some point (like incremental builds, caching of build results, proper library target support etc.). But the time frame for this is currently completely unclear, unfortunately.