LLVM Make issues


I am trying to make LLVM 3.4 on my Macbook. But I am facing the following errors:

llvm[2]: Compiling disassemble.c for Release+Asserts build

gcc: error: unrecognized command line option ‘-Wcovered-switch-default’

rm: /usr/local/bin/build/tools/llvm-c-test/Release+Asserts/disassemble.d.tmp: No such file or directory

make[2]: *** [/usr/local/bin/build/tools/llvm-c-test/Release+Asserts/disassemble.o] Error 1

make[1]: *** [llvm-c-test/.makeall] Error 2

make: *** [all] Error 1

Harshvardhans-MacBook-Pro:build Sherlock$ gcc --version

gcc (Homebrew gcc 4.9.2_1 --without-multilib) 4.9.2

Copyright (C) 2014 Free Software Foundation, Inc.

Since you are on a mac, probably the easiest way to resolve this would be to install Xcode use clang instead of gcc.

Also if you’re new to LLVM you might want to review http://llvm.org/docs/GettingStarted.html.

At this point we’re recommending CMake instead of autotools as the preferred way to build LLVM.