[cfe-dev] clang + cygwin + -ferror-limit does not work when there are no errors

Reid Kleckner rnk at google.com
Wed Jan 28 10:03:57 PST 2015


First, it would be nice if Clang used the integrated assembler on Cygwin by
default. I don't recall why it is disabled by default. Try passing
-integrated-as to clang to get this behavior locally.

I believe GCC is being used because finding an appropriate 'as' to run (it
could be triple prefixed) is hard.

On Wed, Jan 28, 2015 at 9:36 AM, Guilherme <guibufolo+llvm at gmail.com> wrote:

> Hello,
>
> I was building and notices something strange. When build errors
> occurrs all works fine but when no errors are present, the flag is
> passed to gcc. Same thing happens with the -fcolor-diagnostic flag.
>
> Two odd things here:
>
> 1. Why is the flag passed on to gcc?
> 2. Why is gcc being used at all?
>
> Console output:
>
>     uidw8099 at FRL2T93G ~/playground/SM_Test/build master $clang -Werror
> -pedantic -xc -c -MD -MF int_sm.o.dep -std=c99 -ferror-limit=10
> ../int_Yes_StateMachine.c -o int_sm.o
>     (errors properly printed)
>     2 errors generated.
>
>     uidw8099 at FRL2T93G ~/playground/SM_Test/build master $clang -Werror
> -pedantic -xc -c -MD -MF int_sm.o.dep -std=c99 -ferror-limit=10
> ../int_Yes_StateMachine.c -o int_sm.o
>     gcc: error: unrecognized command line option ‘-ferror-limit=10’
>     clang: error: assembler (via gcc) command failed with exit code 1
> (use -v to see invocation)
>
> What is going on here?
>
> Thank you.
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150128/ccc87b48/attachment.html>


More information about the cfe-dev mailing list