Ok for google branches. 1) document the difference of this option with -grecord-gcc-switches (this one only record codegen related options, and recorded in debug section), and with -frecord-gcc-switches? 2) may be better to use option name: -frecord-gcc-switches-in-object
thanks, David On Sun, Oct 9, 2011 at 6:16 PM, Dehao Chen <de...@google.com> wrote: > On Sun, Oct 9, 2011 at 5:28 PM, Jakub Jelinek <ja...@redhat.com> wrote: >> On Sun, Oct 09, 2011 at 09:18:25AM +0800, Dehao Chen wrote: >>> Unfortunately -frecord-gcc-switches cannot serve our purpose because >>> the recorded switches are mergable, i.e. the linker will merge all >>> options to a set of strings. However, object files may have distinct >>> compile options. We want to preserve every object file's compile >>> options when doing LIPO build. >> >> And -grecord-gcc-switches? That one, although it is mergeable, still >> preserves every object files's compile options. > > I tried -grecord-gcc-switches, but looks like it's not recording > options that I want. > > e.g. the following two commands output the same assembly code, while > the former should record one more options. > > gcc -g3 -grecord-gcc-switches a.c -Dabcdefgh -Dxyzzzz -I/usr/ -S > gcc -g3 -grecord-gcc-switches a.c -Dabcdefgh -Dxyzzzz -S > > Thanks, > Dehao > >> >> Jakub >> >