I'm building an older version of llvm, 3.5.1, on an ubuntu virtual machine. I downloaded the source code from here (https://releases.llvm.org/download.html#3.5.1)
After downloading the source code I followed the instructions here (https://llvm.org/docs/GettingStarted.html) I made a build directory in which I ran "$cmake -G Ninja -DCMAKE_BUILD_TYPE=debug ../llvm" to build it with Ninja. This works as intended.
However when I try to run "$cmake --build ." to actually build it, it fails with the error "cc: error: unrecognized command-line option '-fcolor-diagnostics' "
Any help is appreciated!
My gcc version is: (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Here is the extended error message
[1/1441] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o /usr/bin/cc -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/isaac/llvm/build/lib/Support -I/home/isaac/llvm/llvm/lib/Support -I/home/isaac/llvm/build/include -I/home/isaac/llvm/llvm/include -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wno-comment -fcolor-diagnostics -g -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o -c /home/isaac/llvm/llvm/lib/Support/ConvertUTF.c cc: error: unrecognized command-line option 'fcolor-diagnostics'