Cocoa and dead-code stripping
Cocoa and dead-code stripping
- Subject: Cocoa and dead-code stripping
- From: Steve Christensen <email@hidden>
- Date: Sun, 1 Jul 2007 19:05:43 -0700
Since I have a large number of targets that share a bunch of common
code, I currently build a static library with the common bits and
then link that against all of the other targets. This works pretty
well for C++/Carbon.
I'm starting to incorporate Cocoa pieces into the shared library and
was wondering if I'll start running into code bloat if I create full-
featured classes but, for example, only end up using a couple of
methods in a particular target. Does the linker correctly determine
which methods are actually used and just including them (and methods
they call, etc.)? Or am I going to find that all class methods are
included because the linker can't tell which methods might be called?
Basically this is a question about best practices in terms of
developing common, reusable code. I don't want to end up with a 1MB
executable, when really only 100K of the code would ever be used. :-)
steve
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden