]> git.ipfire.org Git - thirdparty/gcc.git/commit
lto-plugin - support -save-temps, -v, --version.
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 15 May 2019 09:12:21 +0000 (09:12 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Wed, 15 May 2019 09:12:21 +0000 (09:12 +0000)
commitc101cff86ea770fe29f18e5c955e85ce9830b029
tree4933779deed5857c82376f5f285e54de1998ce29
parentdebe1ba0190b1cf61499533ef01b0bdb51bf581e
lto-plugin - support -save-temps, -v, --version.

This patch makes the lto-plugin follow the same approach
to save-temps as collect2.

-save-temps causes the temp file to be named meaningfully,
and for the relevant input files to be saved in CWD.

-v, —version causes the save actions to be output to stderr.

one can get this to happen by just putting -save-temps, -v on
the regular link line or (for compatibility with the way the
 -debug flag works) by appending -plugin-opt=-save-temps, etc.

lto-plugin/

2019-05-15  Iain Sandoe  <iain@sandoe.co.uk>

* lto-plugin.c (exec_lto_wrapper): Make the wrapper
arguments filename more user-friendly.
(file_exists, maybe_unlink): New.
(cleanup_handler): Use maybe unlink to handle the
case when temps should be saved.
(process_option): Look for -v, —-version, -save-temps.
(onload): Record the linker output file name.
Check for -v, —-version, -save-temps in the GCC collect
options environment.

From-SVN: r271202
lto-plugin/ChangeLog
lto-plugin/lto-plugin.c