diff options
author | Richard Guenther <rguenther@suse.de> | 2009-11-04 09:40:15 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-11-04 09:40:15 +0000 |
commit | e3b8749b11ce6763e1b413958b15955095ffd099 (patch) | |
tree | 4e0f40347c54926e23c511d26a4a282449a2ee8c /gcc/opts.c | |
parent | 00ffc97dfaff36299281e8f6641c137c86ba1b42 (diff) | |
download | gcc-e3b8749b11ce6763e1b413958b15955095ffd099.tar.gz |
c-opts.c (c_common_post_options): Move LTO option processing code ...
2009-11-04 Richard Guenther <rguenther@suse.de>
* c-opts.c (c_common_post_options): Move LTO option processing
code ...
* opts.c (decode_options): ... here.
fortran/
* options.c (gfc_post_options): Rely on common code processing
LTO options. Only enable -fwhole-file here.
From-SVN: r153889
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c index 72411b662cc..b2b6c4454ee 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -1117,6 +1117,28 @@ decode_options (unsigned int argc, const char **argv) PARAM_VALUE (PARAM_STACK_FRAME_GROWTH) = 40; } + if (flag_lto || flag_whopr) + { +#ifdef ENABLE_LTO + flag_generate_lto = 1; + + /* When generating IL, do not operate in whole-program mode. + Otherwise, symbols will be privatized too early, causing link + errors later. */ + flag_whole_program = 0; + + /* FIXME lto. Disable var-tracking until debug information + is properly handled in free_lang_data. */ + flag_var_tracking = 0; +#else + error ("LTO support has not been enabled in this configuration"); +#endif + } + + /* Reconcile -flto and -fwhopr. Set additional flags as appropriate and + check option consistency. */ + if (flag_lto && flag_whopr) + error ("-flto and -fwhopr are mutually exclusive"); } #define LEFT_COLUMN 27 |