Patchwork [GOOGLE] record compiler options before any compilation

login
register
mail settings
Submitter Dehao Chen
Date July 10, 2013, 11:59 p.m.
Message ID <CAO2gOZXKAVHeX_F70b+hG0XQg-xQc_FODe=L+4thzAxwAMwbxw@mail.gmail.com>
Download mbox | patch
Permalink /patch/258271/
State New
Headers show

Comments

Dehao Chen - July 10, 2013, 11:59 p.m.
This fix is need if you want to collect AutoFDO profile on
AutoFDO+LIPO optimized binary.

Testing on going.

OK for google branches?

Thanks,
Dehao
Xinliang David Li - July 11, 2013, 12:05 a.m.
Ok after testing.

David

On Wed, Jul 10, 2013 at 4:59 PM, Dehao Chen <dehao@google.com> wrote:
> This fix is need if you want to collect AutoFDO profile on
> AutoFDO+LIPO optimized binary.
>
> Testing on going.
>
> OK for google branches?
>
> Thanks,
> Dehao
>
> Index: gcc/toplev.c
> ===================================================================
> --- gcc/toplev.c (revision 200855)
> +++ gcc/toplev.c (working copy)
> @@ -1960,9 +1960,9 @@
>
>            timevar_stop (TV_PHASE_SETUP);
>
> -          compile_file ();
>    if (flag_record_compilation_info_in_elf)
>      write_compilation_info_to_asm ();
> +  compile_file ();
>          }
>        else
>          {

Patch

Index: gcc/toplev.c
===================================================================
--- gcc/toplev.c (revision 200855)
+++ gcc/toplev.c (working copy)
@@ -1960,9 +1960,9 @@ 

           timevar_stop (TV_PHASE_SETUP);

-          compile_file ();
   if (flag_record_compilation_info_in_elf)
     write_compilation_info_to_asm ();
+  compile_file ();
         }
       else
         {