[LTO][PATCH] Delete temporary ltrans output files

Diego Novillo dnovillo@google.com
Tue Dec 9 15:26:00 GMT 2008


Temporary file handling needs  to be cleaned up.  We've been
using and -Wl,-debug WPA_SAVE_LTRANS as a quick hack, but it's
too confusing, there should be a single mechanism for all this.

I propose that we use -save-temps to preserve *every* temporary
file.

The flow of processes and temporary files is something like this:

$ gcc -fwhopr -save-temps -o a a.o b.o
    -> collect2 -fwhopr [various-flags] -o a a.o b.o
      -> lto-wrapper gcc/xgcc -fwhopr -save-temps -o a a.o b.o
	-> lto1 -fwpa a.o b.o ...
	    -> ltrans-driver (reads -save-temps from CFLAGS)
		-> lto1 -fno-wpa -fltrans a.o -o <tmp>.lto.ltrans.o
		-> lto1 -fno-wpa -fltrans b.o -o <tmp>.lto.ltrans.o


We may need to interpret -save-temps in lto1 to preserve
temporary files.

Another thing I would like to do at some point is to have a
better naming convention for the WPA and LTRANS object files and
dumpbases, the random strings are impossible to link back to the
original source files.


Thoughts?


Diego.



More information about the Gcc-patches mailing list