Index: tools/lldb-server/CMakeLists.txt =================================================================== --- tools/lldb-server/CMakeLists.txt +++ tools/lldb-server/CMakeLists.txt @@ -54,6 +54,13 @@ llvm_config(lldb-server ${LLVM_LINK_COMPONENTS}) target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS}) + + # The linking fails when building for MIPS unless the atomic library + # is added explicitly. + if( CMAKE_SYSTEM_PROCESSOR STREQUAL "mips") + target_link_libraries(lldb-server atomic) + endif() + endif() set_target_properties(lldb-server PROPERTIES VERSION ${LLDB_VERSION})