Disable C++ vtable generate for interface classes (pure virtual, abstract)
Disable C++ vtable generate for interface classes (pure virtual, abstract)
- Subject: Disable C++ vtable generate for interface classes (pure virtual, abstract)
- From: "Shawn Erickson" <email@hidden>
- Date: Tue, 6 Nov 2007 09:31:51 -0800
We have a strong requirement to minimize the size of our product and
to that end the Windows version of our product uses a MS compiler
inline attribute to disable the generation of vtables for C++ classes
that are abstract (never instantiated at runtime directly). This
removes unneeded bulk from our product.
The Windows guys use the following...
#define INTERFACE struct __declspec(novtable)
#define ABSTRACT class __declspec(novtable)
INTERFACE ISomeClassName {
...
};
See <http://msdn.microsoft.com/msdnmag/issues/0300/c/> for more information.
Anyway... so far in my searching I haven't found a matching feature in gcc...
Does gcc / Apple gcc have such a capability?
Any suggestions on how to strip these vtables out after the fact? etc.
We do use dead code stripping for our Mac builds but that doesn't
appear to remove the vtable entries (assuming I am reading nm / otool
output correctly).
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden