On Tue, May 5, 2009 at 10:38 AM, Andi Kleen <a...@firstfloor.org> wrote: > On Tue, May 05, 2009 at 10:25:13AM -0700, Xinliang David Li wrote: >> Andi, >> >> On Tue, May 5, 2009 at 1:49 AM, Andi Kleen <a...@firstfloor.org> wrote: >> > Xinliang David Li <davi...@google.com> writes: >> >> >> >> If the idea is generally accepted, I will prepare a series of patches >> >> and submit them to gcc trunk. >> > >> > I was reading your wiki page. Interesting idea. >> > >> > One aspect that wasn't clear to me on reading it was how different >> > compiler arguments for different files are handled. How would the >> > compiler compiling another source file know what special arguments >> > (like -I -D or special -f options) it needs? Or in what directory it >> > was compiled in for -I paths? Or do you assume that is always all the >> > same? >> >> This is actually mentioned in the document. Please see the section >> about the module info record format. In each module info, the >> information about -I paths, -D/-Us are recorded. Those will be passed >> to the preprocessor when each module is processed. > > I found it after the post :/. But it seems to be only a small subset of > options. How about -m or -f flags?
Right -- general option handling is yet need to be done. For instance, we may not want to inline a function from a module with -fstrict-aliasing to another function from a module with -fno-strict-aliasing. This is a universal CMO problem. One simple way is to use option checksum to make sure imported module has the same option as the importing module. Thanks, David > > -Andi > > -- > a...@linux.intel.com -- Speaking for myself only. >