diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c index ff79f4ac462..6ab9822f369 100644 --- a/lto-plugin/lto-plugin.c +++ b/lto-plugin/lto-plugin.c @@ -190,6 +190,8 @@ static int lto_wrapper_num_args; static char **pass_through_items = NULL; static unsigned int num_pass_through_items; +static char *ltrans_objects = NULL; + static bool debug; static bool save_temps; static bool verbose; @@ -739,6 +741,14 @@ all_symbols_read_handler (void) return LDPS_OK; } + if (ltrans_objects) + { + FILE *objs = fopen (ltrans_objects, "r"); + add_output_files (objs); + fclose (objs); + return LDPS_OK; + } + lto_argv = (char **) xcalloc (sizeof (char *), num_lto_args); lto_arg_ptr = (const char **) lto_argv; assert (lto_wrapper_argv); @@ -1345,6 +1355,8 @@ process_option (const char *option) break; } } + else if (startswith (option, "-ltrans-objects=")) + ltrans_objects = xstrdup (option + strlen ("-ltrans-objects=")); else { int size;