[PATCH] Pass -I flags to the integrated assembler

Joerg Sonnenberger joerg at britannica.bec.de
Tue Nov 12 15:26:45 PST 2013


On Tue, Nov 12, 2013 at 03:10:25PM -0800, David Peixotto wrote:
> > On Tue, Nov 12, 2013 at 01:03:32PM -0800, David Peixotto wrote:
> > > It looks like -Wa,-Ifoo is not supported by current clang:
> > >
> > >   $ clang -c test/ias.s  -Ifoo_dir -integrated-as -target x86 -Wa,-I -
> > ###
> > > 2>&1 | grep -- -I
> > >   clang: error: unsupported argument '-I' to option 'Wa,'
> > 
> > Correct, nothing claims the option, so it complains.
> > Look for CollectArgsForIntegratedAssembler in Tools.cpp.
> 
> 
> Ok, to summarize the discussion so far, the options are:
> 
> 1. Pass -I args to both the integrated assembler (my current patch) and
> external assembler (need to fix bug in current clang to pass -I when
> directly invoking as).
> 
> 2. Change -Wa to accept -I
> 
> 3. Both 1+2
> 
> It seems from limited experimentation by Rafael and myself that GCC
> implements #3. What should we implement for clang?

Only in recent versions. My earlier question still stands -- what is the
precendence. I wouldn't expect -I to be honoured, but I wouldn't expect
something like .include to exist in the assembler either :)

Joerg



More information about the cfe-commits mailing list