<p dir="ltr">Why is your clang++ binary producing g++ error messages?</p>
<p dir="ltr">Or am I misreading this somehow?</p>
<div class="gmail_quote">On Sep 19, 2014 12:31 AM, "Guilherme" <<a href="mailto:guibufolo@gmail.com">guibufolo@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello<br>
<br>
I'm able to properly generate the Ninja file with the following invocation:<br>
<br>
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=1<br>
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang<br>
-DCMAKE_CXX_COMPILER=clang++ ../llvm<br>
<br>
But when trying to build it fails with:<br>
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVMSupport_EXPORTS -D_DEBUG<br>
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS<br>
-Wall -W -Wno-unused-parameter -Wwrite-strings<br>
-Wmissing-field-initializers -pedantic -Wno-long-long<br>
-Wcovered-switch-default -std=gnu++11 -fcolor-diagnostics -g -fPIC<br>
-Ilib/Support -I/home/uidw8099/llvm/lib/Support -Iinclude<br>
-I/home/uidw8099/llvm/include -fno-exceptions -fno-rtti -MMD -MT<br>
lib/Support/CMakeFiles/LLVMSupport.dir/ARMBuildAttrs.cpp.o -MF<br>
"lib/Support/CMakeFiles/LLVMSupport.dir/ARMBuildAttrs.cpp.o.d" -o<br>
lib/Support/CMakeFiles/LLVMSupport.dir/ARMBuildAttrs.cpp.o -c<br>
/home/uidw8099/llvm/lib/Support/ARMBuildAttrs.cpp<br>
g++: error: unrecognized command line option ‘-fcolor-diagnostics’<br>
clang: error: assembler (via gcc) command failed with exit code 1 (use<br>
-v to see invocation)<br>
<br>
At the end you can see that the -fcolor-diagnostic flag is added. Is<br>
this a cmake problem or a Makelists problem in llvm configuration?<br>
<br>
Why is this flag being passed on to the assembler anyway?<br>
<br>
Cheers,<br>
Red<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>