axw added a comment. I have reverted this, because it breaks if you have BUILD_SHARED_LIBS=on and we're about to branch for 3.8. I'll reapply when http://reviews.llvm.org/D15986 (or another fix) is ready to land. http://reviews.llvm.org/D15033