[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [creduce-dev] Handrolled LLVM+Clang on Ubuntu 14.04 (Re: towards a release)
Yang Chen <chenyang@cs.utah.edu> writes:
> g++: error: unrecognized command line option '-fcolor-diagnostics'
FWIW, just now I built LLVM+Clang 3.8.0 with Clang (3.8.0, binary package), on
Ubuntu 14.04. Here is the output of the newly built `llvm-config`:
305 imp:...randtest/build> bin/llvm-config --cxxflags
-I/disk2/randtest/llvm-3.8.0.src/include -I/disk2/randtest/build/include -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -std=c++11 -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
In particular, no `-fcolor-diagnostics`.
So, I investigated a bit. The logic for getting `-fcolor-diagnostics` into the
command line is the follwoing, found in file
`cmake/modules/HandleLLVMOptions.cmake`:
# clang doesn't print colored diagnostics when invoked from Ninja
if (UNIX AND
CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
CMAKE_GENERATOR STREQUAL "Ninja")
append("-fcolor-diagnostics" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()
Are the code and comment inconsistent? Why would you not want to print color
diagnostics if you're building with Make?
Whatever.
--
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu> . University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX