[PATCH] Pass -I flags to the integrated assembler
David Peixotto
dpeixott at codeaurora.org
Tue Nov 12 15:10:25 PST 2013
> 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?
I think I am in favor of option 3 because it gives some flexibility for
passing arguments to the assembler, maintains the same behavior when using
an integrated or external assembler, and is compatible with gcc behavior.
More information about the cfe-commits
mailing list