TrimExports

TrimExports is an optimization tool that excludes specific member functions from exports files (*.e). This process makes libraries smaller (by shrinking the loader section), their load times faster, and also speeds up the link times of any clients of the libraries.

NOTE TrimExports is a tool used by the build process. You can run it standalone, but for efficiency, you should specify classes to trim by using a TrimExports: tag in your *.PinkMake file instead.

Syntax

    TrimExports [ -i exportFile ] [ -f excludeFile ] [ className... ] [ -u ] [ -v ]
    | -version

Arguments -f excludeFile Excludes the classes named in the text file. These are in addition to those named in the className list.
-i exportFile The export file to trim. (Default is stdin.)
-u (Used) Emits warnings when a class being trimmed is used by functions that are not trimmed. A class is used if its name appears in the signature of another function, as in a function that takes an object of that class as an argument. This can be an indication that a class is being trimmed but should not be.
-v (Verbose) Lists each member function that is being trimmed.
-version Reports the TrimExports version number and quits.
className... Class names to exclude from exportFile. These are in addition to classes specified in excludeFile.

Usage

You should trim an export file purely for optimization purposes; you are never required to do so. When you trim classes, trim only those that are used entirely within your library, that is, classes that no other library or program would care to know about.

NOTE It is possible to make a mistake, to trim too much. Be careful, and trim classes used only internally by your library. For more information, see "Reduced library footprint" on page 69.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker