[PATCH] Make libclc link if llvm was built with --enable-libcpp --enable-cxx11

If llvm was built with

   --enable-libcpp --enable-cxx11

then any C++ code compiled and linked against LLVM
needs to include

   -stdlib=libc++ -std=c++11

Unfortunately, these just occur in --cxxflags of
llvm-config and not in --ldflags. Hence, the flags
are not passed when linking prepare-builtins. As a
work around pass all --cxxflags at the linking stage.

Hi Jeroen,

Hi Peter,

Thanks for your fast reply.


Wouldn't it be better to fix llvm-config so that the flags appear
in --ldflags?

Indeed, you're absolutely right. Note, however, that this doesn't help much with the version of llvm that libclc current builds against (or the new llvm 3.3 for that matter). In any case, I'll make sure to take up this issue with the llvm people.