[LLVMdev] Error compiling llvm/clang with clang+libc++ with -std=cxx0x

Ashok Nalkund ashoknn at qualcomm.com
Mon Jun 25 19:22:52 PDT 2012


Hi All,
    I'm using LLVM/Clang 3.1 release.

    I first compiled llvm/clang using GCC per the instructions on the 
web with cmake. I then compiled libc++ per the instructions on the web. 
I then tried to compile llvm/clang with previously compiled clang and 
libc++ using "-std=c++0x -stdlib=libc++" flags. But the compilation 
fails at:

> [ 58%] Building CXX object tools/bugpoint/CMakeFiles/bugpoint.dir/ToolRunner.cpp.o
> clang-3: warning: argument unused during compilation: '-stdlib=libc++'
> clang-3: warning: argument unused during compilation: '-L/local/mnt/workspace/ashoknn/519_libcxx_transition/llvm/build/../../libcxx.artifacts/linux-clang/lib'
> /local/mnt/workspace/ashoknn/519_libcxx_transition/llvm/src/tools/bugpoint/ToolRunner.cpp:131:12: error: invalid operands to binary expression ('llvm::raw_ostream' and 'std::ostringstream'
>       (aka 'basic_ostringstream<char>'))
>     errs() << OS;
>     ~~~~~~ ^  ~~

    If I remove the -std=c++0x, then the compilation is successful. I 
checked to see if libc++ itself was compiled with the flag and indeed it 
was.

   Any pointers?

TIA,
Ashok



More information about the llvm-dev mailing list