[LLVMdev] Link error when I compile the Toy(kaleidoscope) example
Tim Northover
t.p.northover at gmail.com
Tue Jul 7 12:10:30 PDT 2015
> undefined reference to `typeinfo for llvm::CmpInst'
> clang-3.7: error: linker command failed with exit code 1 (use -v to see
> invocation)
Looks like an error from the toy being built with -frtti but LLVM with
-fno-rtti. Try this if you're not actually using the typeinfo:
$ clang++ -g -O3 toy.cpp `llvm-config --cxxflags --ldflags
--system-libs --libs core` -fno-rtti -o toy
I've never been quite sure why that flag isn't part of "llvm-config --cxxflags".
Tim.
More information about the llvm-dev
mailing list