Message ID | CABtf2+SZ0TQTkfKTxUaJSap1s2szSMhybzcoD9ejtm0qBy9Trg@mail.gmail.com |
---|---|
State | New |
Headers | show |
Series | Disable vtable verification with LTO | expand |
On 9/4/19 3:59 PM, Caroline Tice via gcc-patches wrote: > Vtable verification currently does not work properly with LTO. Fixing > this will be non-trivial, and I currently do not have the time do > this. Until this can be fixed, we should not allow users to specify > both vtable verification and link-time optimization. The attached > patch checks to see if both options were specified and if so, tells > the user that this is not supported. > > I have tested this by compiling hello world with each option > separately and then trying to specify them both; it behaves as > expected. > > Is this patch OK to commit? > > -- Caroline Tice > cmtice@google.com > > ChangeLog entry: > > 2019-09-04 Caroline Tice <cmtice@google.com> > > * opts.c (finish_options): Disallow -fvtable-verify and -flto to be > specified together; OK. jeff >
Index: gcc/opts.c =================================================================== --- gcc/opts.c (revision 275387) +++ gcc/opts.c (working copy) @@ -1226,6 +1226,10 @@ if (opts->x_flag_live_patching && opts->x_flag_lto) sorry ("live patching is not supported with LTO"); + /* Currently vtable verification is not supported for LTO */ + if (opts->x_flag_vtable_verify && opts->x_flag_lto) + sorry ("vtable verification is not supported with LTO"); + /* Control IPA optimizations based on different -flive-patching level. */ if (opts->x_flag_live_patching) {