[LTO][PATCH] Delete temporary ltrans output files

Simon Baldwin simonb@google.com
Tue Dec 9 14:21:00 GMT 2008


Rafael Espindola wrote:
>> How does one arrange for -debug to be passed to lto-wrapper from the gcc
>> command line?  Neither -Wl,-debug nor -save-temps, the two main ways to
>> suppress temporary file removals for gcc, seem to set it.
>>     
>
> You will probably have to change collect2 to pass -debug to lto-wrapper.
>   

Well, before lto-wrapper was factored out of it, collect2 used to set 
WPA_SAVE_LTRANS if -debug.  lto1 uses this value way, way down the 
cascade of stuff that happens on WPA "link", in order to suppress 
removal of its temporary object files.  Passing a command line flag 
through this whole chain of events was deemed much too disruptive for a 
debugging feature.

So, setting WPA_SAVE_LTRANS if -debug needs to go back into collect2, 
for lto1.  Given that, isn't it simpler to just use this to retain 
temporary files in the intermediate lto-wrapper, rather changing 
collect2 to pass -debug to lto-wrapper?

-- 
Google UK Limited | Registered Office: Belgrave House, 76 Buckingham
Palace Road, London SW1W 9TQ | Registered in England Number: 3977902



More information about the Gcc-patches mailing list