kkwli0 added a comment. It turns out that having the warning message also affects the C_SUPPORTS_FPIC test in `cmake/modules/HandleLLVMOptions.cmake`. As a result, `cmake` thinks that `-fPIC` is not supported. Eventually, it leads to error in `libclang-cpp.so`.
../../lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenModule.cpp.o: In function `clang::CodeGen::CodeGenModule::~CodeGenModule()': CodeGenModule.cpp:(.text+0x1134): call to `std::_Rb_tree<int, std::pair<int const, llvm::TinyPtrVector<llvm::Function*> >, std::_Select1st<std::pair<int const, llvm::TinyPtrVector<llvm::Function*> > >, std::less<int>, std::allocator<std::pair<int const, llvm::TinyPtrVector<llvm::Function*> > > >::_M_erase(std::_Rb_tree_node<std::pair<int const, llvm::TinyPtrVector<llvm::Function*> > >*)' lacks nop, can't restore toc; recompile with -fPIC ... I don't think it is a good idea to modify this test which explicitly specifies -Werror. Any other ideas are definitely welcome! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74571/new/ https://reviews.llvm.org/D74571 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits