Fix cmake build issues on Darwin.

llvm-svn: 203850
This commit is contained in:
Todd Fiala 2014-03-13 21:16:13 +00:00
parent 59abbd4d9b
commit 8a5c5a016c
7 changed files with 18 additions and 5 deletions

View File

@ -135,6 +135,9 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
lldbPluginProcessMacOSXKernel lldbPluginProcessMacOSXKernel
lldbPluginSymbolVendorMacOSX lldbPluginSymbolVendorMacOSX
lldbPluginSystemRuntimeMacOSX lldbPluginSystemRuntimeMacOSX
lldbPluginProcessPOSIX
lldbPluginProcessElfCore
lldbPluginJITLoaderGDB
) )
endif() endif()
@ -167,6 +170,8 @@ if (NOT LLDB_DISABLE_PYTHON)
list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARIES}) list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARIES})
endif() endif()
list(APPEND LLDB_SYSTEM_LIBS ${system_libs})
set( LLVM_LINK_COMPONENTS set( LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD} ${LLVM_TARGETS_TO_BUILD}
jit jit

View File

@ -1,3 +1,4 @@
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Windows") if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "Linux"
OR CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_subdirectory(GDB) add_subdirectory(GDB)
endif() endif()

View File

@ -1,16 +1,15 @@
if (CMAKE_SYSTEM_NAME MATCHES "Linux") if (CMAKE_SYSTEM_NAME MATCHES "Linux")
add_subdirectory(Linux) add_subdirectory(Linux)
add_subdirectory(POSIX) add_subdirectory(POSIX)
add_subdirectory(elf-core)
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
add_subdirectory(FreeBSD) add_subdirectory(FreeBSD)
add_subdirectory(POSIX) add_subdirectory(POSIX)
add_subdirectory(elf-core)
elseif (CMAKE_SYSTEM_NAME MATCHES "Windows") elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
add_subdirectory(elf-core)
elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin") elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_subdirectory(POSIX)
add_subdirectory(MacOSX-Kernel) add_subdirectory(MacOSX-Kernel)
endif() endif()
add_subdirectory(gdb-remote) add_subdirectory(gdb-remote)
add_subdirectory(Utility) add_subdirectory(Utility)
add_subdirectory(mach-core) add_subdirectory(mach-core)
add_subdirectory(elf-core)

View File

@ -40,6 +40,8 @@ add_library(lldbDebugserverCommon
add_dependencies(lldbDebugserverCommon generate_dnbconfig) add_dependencies(lldbDebugserverCommon generate_dnbconfig)
if (CMAKE_SYSTEM_NAME MATCHES "Darwin") if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
find_library(COCOA_LIBRARY Cocoa)
target_link_libraries(lldbDebugserverCommon ${COCOA_LIBRARY})
add_subdirectory(MacOSX) add_subdirectory(MacOSX)
endif() endif()

View File

@ -40,6 +40,12 @@ add_lldb_executable(debugserver
${generated_mach_interfaces} ${generated_mach_interfaces}
) )
set_source_files_properties(
HasAVX.s
# Necessary since compilation will fail with stand-alone assembler
PROPERTIES LANGUAGE C COMPILE_FLAGS "-x assembler-with-cpp"
)
add_dependencies(debugserver generate_dnbconfig) add_dependencies(debugserver generate_dnbconfig)
target_link_libraries(debugserver ${DEBUGSERVER_USED_LIBS}) target_link_libraries(debugserver ${DEBUGSERVER_USED_LIBS})

View File

@ -18,6 +18,7 @@
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include "MacOSX/x86_64/DNBArchImplX86_64.h" #include "MacOSX/x86_64/DNBArchImplX86_64.h"
#include "../HasAVX.h"
#include "DNBLog.h" #include "DNBLog.h"
#include "MachThread.h" #include "MachThread.h"
#include "MachProcess.h" #include "MachProcess.h"

View File

@ -16,7 +16,6 @@
#if defined (__i386__) || defined (__x86_64__) #if defined (__i386__) || defined (__x86_64__)
#include "DNBArch.h" #include "DNBArch.h"
#include "../HasAVX.h"
#include "MachRegisterStatesX86_64.h" #include "MachRegisterStatesX86_64.h"
#include <map> #include <map>