diff --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt --- a/lldb/tools/debugserver/source/CMakeLists.txt +++ b/lldb/tools/debugserver/source/CMakeLists.txt @@ -236,7 +236,12 @@ ${generated_mach_interfaces} ${DEBUGSERVER_VERS_GENERATED_FILE}) -add_library(lldbDebugserverCommon ${lldbDebugserverCommonSources}) +# Tell LLVM not to complain about these source files. +set(LLVM_OPTIONAL_SOURCES + ${lldbDebugserverCommonSources} + debugserver.cpp) + +add_lldb_library(lldbDebugserverCommon ${lldbDebugserverCommonSources}) set_target_properties(lldbDebugserverCommon PROPERTIES FOLDER "lldb libraries/debugserver") target_link_libraries(lldbDebugserverCommon @@ -259,7 +264,6 @@ set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION) endif() -set(LLVM_OPTIONAL_SOURCES ${lldbDebugserverCommonSources}) add_lldb_tool(debugserver ADD_TO_FRAMEWORK debugserver.cpp LINK_LIBS lldbDebugserverCommon @@ -315,7 +319,7 @@ -F${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks ) - add_library(lldbDebugserverCommon_NonUI ${lldbDebugserverCommonSources}) + add_lldb_library(lldbDebugserverCommon_NonUI ${lldbDebugserverCommonSources}) target_link_libraries(lldbDebugserverCommon_NonUI INTERFACE ${COCOA_LIBRARY} ${CORE_FOUNDATION_LIBRARY}