[Bug pch/15351] New: Add option for caching headers

v13 at it dot teithe dot gr gcc-bugzilla@gcc.gnu.org
Sun May 9 19:52:00 GMT 2004


I believe that if you could add an option to gcc that would create a cache of  
precompiled headers for all the headers of each compiled program in a user  
specified dir would be much more efficient than trying to compile all headers  
with the same options and defines every now and then.  
  
i.e:  
gcc -c a.c -o a -Xhdr-cache/  
  
could auto-compile all headers included be a.c (just those listed in include  
statements in a.c) and also look for precompiled headers in hdr-cache/ dir.  
  
This could help big projects like kde to 'ship' with pch support just by  
having a gcc version check in ./configure script and adding an option like  
-X{$top_srcdir}/hdr_cache to CFLAGS/CXXFLAGS.  
  
Currently it is almost impossible to precompile headers of /usr/include since  
every program out there uses its own defines and can only be done if every  
developer out there does a precompiling before compiling his project.  
  
Thanks in advance  
  
<<V13>>

-- 
           Summary: Add option for caching headers
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: pch
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: v13 at it dot teithe dot gr
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15351



More information about the Gcc-bugs mailing list