]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add -frepo docs.
authorJeff Law <law@gcc.gnu.org>
Fri, 14 Nov 1997 01:57:05 +0000 (18:57 -0700)
committerJeff Law <law@gcc.gnu.org>
Fri, 14 Nov 1997 01:57:05 +0000 (18:57 -0700)
From-SVN: r16479

gcc/extend.texi

index 6a250a94487b41388b4fff92030fb63ca8e15124..b72de89c38a5bba62e426e4dfe664d6530f78366 100644 (file)
@@ -3230,6 +3230,30 @@ In the mean time, you have the following options for dealing with
 template instantiations:
 
 @enumerate
+@item
+Compile your template-using code with @samp{-frepo}.  The compiler will
+generate files with the extension @samp{.rpo} listing all of the
+template instantiations used in the corresponding object files which
+could be instantiated there; the link wrapper, @samp{collect2}, will
+then update the @samp{.rpo} files to tell the compiler where to place
+those instantiations and rebuild any affected object files.  The
+link-time overhead is negligible after the first pass, as the compiler
+will continue to place the instantiations in the same files.
+
+This is your best option for application code written for the Borland
+model, as it will just work.  Code written for the Cfront model will
+need to be modified so that the template definitions are available at
+one or more points of instantiation; usually this is as simple as adding
+@code{#include <tmethods.cc>} to the end of each template header.
+
+For library code, if you want the library to provide all of the template
+instantiations it needs, just try to link all of its object files
+together; the link will fail, but cause the instantiations to be
+generated as a side effect.  Be warned, however, that this may cause
+conflicts if multiple libraries try to provide the same instantiations.
+For greater control, use explicit instantiation as described in the next
+option.
+
 @item
 Compile your code with @samp{-fno-implicit-templates} to disable the
 implicit generation of template instances, and explicitly instantiate