Index: tools/gold/CMakeLists.txt =================================================================== --- tools/gold/CMakeLists.txt +++ tools/gold/CMakeLists.txt @@ -15,8 +15,14 @@ IPO ) + if ( LLVM_LINK_LIBSTDCXX_INTO_GOLD_PLUGIN ) + set(LINK_LIBS "-static-libgcc;-static-libstdc++") + endif() + add_llvm_loadable_module(LLVMgold gold-plugin.cpp + LINK_LIBS + ${LINK_LIBS} ) endif()