Sunday, March 16, 2014

Using clang++ with waf

As far as I can see, the only way to make waf use clang C++ compiler is to run it like this:

$ CXX=clang++ ./waf configure

This makes waf use clang++ instead of g++ which seems to be the official way of doing this as it is mentioned in the documents here, except that the current documentation says to run it like this:

$ CXX=clang ./waf configure

which did not work for me. Apparently this causes the wrong standard library to be used.