@@ -122,6 +122,7 @@ file(GLOB SRC_FILES
122122 SpellChecker.cpp
123123 Targets.cpp
124124 X86XmmInfo.cpp
125+ LLDBDebugger.cpp
125126
126127 Beef/BfCommon.cpp
127128 Clang/CDepChecker.cpp
@@ -181,42 +182,24 @@ else()
181182 message (FATAL_ERROR "LLVM not found" )
182183endif ()
183184
184- set (DBG64_OBJECTS)
185-
186- # Windows builds debugger backends through separate Debugger32/Debugger64
187- # Visual Studio projects, with BF_DBG_32/BF_DBG_64 defined at the target
188- # level; those Windows debugger backend targets are not currently modeled in
189- # CMake. Do the same for Linux debugger sources here instead of compiling
190- # them as part of the common IDEHelper source list.
191185if (UNIX AND NOT APPLE )
192- set (DBG64_SRC LinuxDebugger.cpp)
193186 find_path (LLDB_INCLUDE_DIR lldb/API/LLDB.h HINTS ${LLVM_INCLUDE_DIRS} )
194187 find_library (LLDB_LIBRARY NAMES lldb liblldb lldb-22 liblldb-22 HINTS ${LLVM_LIBRARY_DIRS} )
195188
196189 if (LLDB_INCLUDE_DIR AND LLDB_LIBRARY)
197190 message (STATUS "Found LLDB: ${LLDB_LIBRARY} " )
198- list ( APPEND DBG64_SRC LLDBDebugger.cpp )
191+ add_definitions ( -DLLDB_ENABLED )
199192 string (APPEND TARGET_LIBS_OS " ${LLDB_LIBRARY} " )
200193 string (STRIP ${TARGET_LIBS_OS} TARGET_LIBS_OS)
201194 else ()
202195 message (WARNING "LLDB was not found; Linux IDE debugger support will be disabled" )
203196 endif ()
204197
205- add_library (IDEHelperDebugger64 OBJECT ${DBG64_SRC} )
206- target_compile_definitions (IDEHelperDebugger64 PRIVATE BF_DBG_64 )
207- if (LLDB_INCLUDE_DIR AND LLDB_LIBRARY)
208- target_compile_definitions (IDEHelperDebugger64 PRIVATE LLDB_ENABLED )
209- target_include_directories (IDEHelperDebugger64 PRIVATE ${LLDB_INCLUDE_DIR} )
210- endif ()
211- set (DBG64_OBJECTS $<TARGET_OBJECTS :IDEHelperDebugger64 >)
212- else ()
213- list (APPEND SRC_FILES LinuxDebugger.cpp)
214198endif ()
215199
216200# Add library to build.
217201add_library (${PROJECT_NAME} STATIC
218202 ${SRC_FILES}
219- ${DBG64_OBJECTS}
220203)
221204
222205if (HAVE_BACKTRACE_HEADERS)
0 commit comments