[LLVMdev] include's are not being located

Joseph Morgan its.jojo.77 at gmail.com
Mon Jun 16 12:35:01 PDT 2014


Hi Dan,

Thank for your response.

I have build llvm/clang successfully (meaning it builds without failing). I keep going back to the build though because I somehow think it’s not properly configured.

When I run the following as you suggest:
 
clang++ -g -O3 toy.cpp `llvm-config --cxxflags --ldflags --libs core` -o toy 

But I continue to get errors as if I am missing C++11:

> In file included from /usr/local/include/llvm/IR/DerivedTypes.h:21:
> In file included from /usr/local/include/llvm/IR/Type.h:19:
> In file included from /usr/local/include/llvm/ADT/APFloat.h:20:
> In file included from /usr/local/include/llvm/ADT/APInt.h:19:
> In file included from /usr/local/include/llvm/ADT/ArrayRef.h:14:
> /usr/local/include/llvm/ADT/SmallVector.h:232:20: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
>   void push_back(T &&Elt) {
>                    ^
> /usr/local/include/llvm/ADT/SmallVector.h:476:33: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
>   iterator insert(iterator I, T &&Elt) {




On Jun 16, 2014, at 2:14 PM, Dan Liew <dan at su-root.co.uk> wrote:

> Hi Joseph,
> 
>> In other words what does " put '--std=c++11' in the CXXFLAGS” mean? Do you
>> have an example of what it would look like? or what should I read in order
>> to learn this? I’m happy to read up but I don’t know where to start reading
>> (besides the getting started page on llvm)   :)
> 
> You're still trying to build the tutorial right? I assume you
> successfully built LLVM already. So if you're building the tutorial
> you probably just need this.
> 
> clang++ -g -O3 toy.cpp `llvm-config --cxxflags --ldflags --libs core` -o toy
> 
> I see your `llvm-config --cxxflags`` output already has --std=c++11
> already in it (your --cppflags does not. I'm not sure why).

^^^ I am wondering if perhaps this is my problem?

> 
> I think Jonanthan may have confused you because his suggestion of
> 
> ../llvm/configure CXX=`which clang++` CXXFLAGS="--std=c++11"
> 
> is for configuring and building LLVM/Clang which you've already done.
> So you shouldn't need to do that again.
> 
> Thanks,
> -- 
> Dan Liew
> PhD Student - Imperial College London





More information about the llvm-dev mailing list