Build fails with CXX=g++ : unrecognized command line options

question

#1

Hello,

I’m building the debug build of Julia with svn build of LLVM+Polly. The build stops when g++ receives the unrecognised options, but which are recognised by clang++.

    CC src/APInt-C.dbg.obj
g++: error: unrecognized command line option ‘-Wcovered-switch-default’
g++: error: unrecognized command line option ‘-Wstring-conversion’
g++: error: unrecognized command line option ‘-fcolor-diagnostics’
make[1]: *** [APInt-C.dbg.obj] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [julia-src-debug] Error 2

Is it advisable to switch over to a different compiler in the middle of a build when the build fails ?

Thank You,
Sanjay


#2

Use the same C++ compiler to build all dependencies and Julia itself. If your llvm build was compiled with clang, then you shouldn’t use g++ to build the rest of Julia and its dependencies, and vice-versa.


#3

Hello @tkelman,

The LLVM build for Julia and Julia ( untill this error ) were built by g++. I shifted to clang only after that. I’ll refrain from changing the compilers henceforth.

Even if I had stuck to g++, how is it that g++ was given arguments that it doesn’t accept ? And how is the Julia build passing on Travis.cl ?

Thank You,
Sanjay


#4

Those arguments would only come from llvm-config.