[cfe-dev] Building llvm/clang using cmake + ninja on cygin fails: -fcolor-diagnostic is passed on to g++

David Blaikie dblaikie at gmail.com
Fri Sep 19 07:21:41 PDT 2014


Why is your clang++ binary producing g++ error messages?

Or am I misreading this somehow?
On Sep 19, 2014 12:31 AM, "Guilherme" <guibufolo at gmail.com> wrote:

> Hello
>
> I'm able to properly generate the Ninja file with the following invocation:
>
> cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=1
> -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang
> -DCMAKE_CXX_COMPILER=clang++ ../llvm
>
> But when trying to build it fails with:
> /usr/bin/clang++   -DGTEST_HAS_RTTI=0 -DLLVMSupport_EXPORTS -D_DEBUG
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
> -Wall -W -Wno-unused-parameter -Wwrite-strings
> -Wmissing-field-initializers -pedantic -Wno-long-long
> -Wcovered-switch-default -std=gnu++11 -fcolor-diagnostics -g -fPIC
> -Ilib/Support -I/home/uidw8099/llvm/lib/Support -Iinclude
> -I/home/uidw8099/llvm/include    -fno-exceptions -fno-rtti -MMD -MT
> lib/Support/CMakeFiles/LLVMSupport.dir/ARMBuildAttrs.cpp.o -MF
> "lib/Support/CMakeFiles/LLVMSupport.dir/ARMBuildAttrs.cpp.o.d" -o
> lib/Support/CMakeFiles/LLVMSupport.dir/ARMBuildAttrs.cpp.o -c
> /home/uidw8099/llvm/lib/Support/ARMBuildAttrs.cpp
> g++: error: unrecognized command line option ‘-fcolor-diagnostics’
> clang: error: assembler (via gcc) command failed with exit code 1 (use
> -v to see invocation)
>
> At the end you can see that the -fcolor-diagnostic flag is added. Is
> this a cmake problem or a Makelists problem in llvm configuration?
>
> Why is this flag being passed on to the assembler anyway?
>
> Cheers,
> Red
>
> _______________________________________________
> 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/20140919/ebf9559a/attachment.html>


More information about the cfe-dev mailing list