mulle-objc, 07-2017 - Activity report
mulle-objc, 07-2017 - Activity report
I have written these informal monthly reports on the community slack of
the mulle-objc community. But it has the disadvantage, that the project doesn’t appear that lively on the outside. So from now on the monthly reports will appear on the weblog.
After the added support for static linking of Objective-C last month, this month has been dedicated to optimizing statically linked executables.
If you static link Objective-C code with -all_load
or somesuch linker flag, you will end up with a huge executable, because all classes and categories will be linked in.
The mulle-objc-runtime can generate coverage files though. The coverage is emitted at the end of an application. It contains the classes and the methods actually used. Using this coverage information, it is now possible to strip
out all the unnecessary .o files from the libraries. Though this is complicated by the recent introduction of +dependencies
, the optimizer can recompile the MulleObjCLoader
categories on a per-library basis.
The tooling added to mulle-objc-developer
makes the process of creating
and maintaining optimizable static libraries pretty much transparent to the developer. Creating an optimized executable can be done like this:
mulle-build
mkdir coverage ; cd coverage
MULLE_OBJC_COVERAGE=YES ../build/my_executable
cd ..
mulle-build -DUSE_OBJC_COVERAGE=ON