forte12 Object Cache
Hello,
I like the new Fort12 object cache but it is a bit of useless to me
because my build environment wipes the source directories before it does
a rebuild of a software. Now I wonder if it is possible to configure
forte12 that it does put the object cache in /tmp or something like
that. Otherwise I will just fall back to ccache.
Thomas
[384 byte] By [
Glanzmanna] at [2007-11-27 6:06:12]

# 1
I'm not sure whether I understand your question.
By "Forte12" do you mean Sun Studio 12 (C++ 5.9)?
By "object cache" do you mean the template instance cache, SunWS_cache, that is used when you specify the -instances=extern option? If so, that is not new. It has not changed since C++ 5.0 in 1998. Earlier compilers used a template cache, but C++ 5.0 used a different cache model.
In Sun Studio 8 (C++ 5.5) we changed the compiler default from -instances=extern, using the cache, to -instances=global, which puts template instances into the .o file and does not use a cache at all. Studio 12 continues to work that way.
We recommend using the default template model and not using the cache. The cache slows down compilation and is a frequent source of problems. If you have a huge application and care more about total disk space than about compilation time, -instances=extern might be appropriate.
If you are asking whether you can designate a different location for the template cache, the answer is no. C++ 4.x (prior to 1998) had such an option, but we were never able to get it to work correctly. The main problem was how associate the correct cache object with a given primary .o file under all possible usage models.