[Lldb-commits] [PATCH] D11450: Fix Mac OS X build, debugserver version handling.

Bruce Mitchener bruce.mitchener at gmail.com
Thu Jul 23 00:18:48 PDT 2015


brucem created this revision.
brucem added reviewers: clayborg, jasonmolenda.
brucem added a subscriber: lldb-commits.

No longer rely on cmake to set DEBUGSERVER_VERSION_STR,
but now generate the _vers.c file like xcode does
and include the generated file into the build on Mac OS X.

This fixes the cmake Mac OS X build after an earlier change
by Jason Molenda.

http://reviews.llvm.org/D11450

Files:
  tools/debugserver/source/CMakeLists.txt
  tools/debugserver/source/MacOSX/CMakeLists.txt

Index: tools/debugserver/source/MacOSX/CMakeLists.txt
===================================================================
--- tools/debugserver/source/MacOSX/CMakeLists.txt
+++ tools/debugserver/source/MacOSX/CMakeLists.txt
@@ -18,6 +18,14 @@
   DEPENDS ${dnbconfig_header}
   )
 
+set(DEBUGSERVER_VERS_GENERATED_FILE ${CMAKE_CURRENT_BINARY_DIR}/debugserver_vers.c)
+set_source_files_properties(${DEBUGSERVER_VERS_GENERATED_FILE} PROPERTIES GENERATED 1)
+
+add_custom_command(OUTPUT ${DEBUGSERVER_VERS_GENERATED_FILE}
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
+          ${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj debugserver
+          > ${DEBUGSERVER_VERS_GENERATED_FILE})
+
 set(DEBUGSERVER_USED_LIBS
   lldbDebugserverCommon
   lldbUtility
@@ -40,6 +48,7 @@
   MachVMMemory.cpp
   MachVMRegion.cpp
   ${generated_mach_interfaces}
+  ${DEBUGSERVER_VERS_GENERATED_FILE}
   )
 
 set_source_files_properties(
Index: tools/debugserver/source/CMakeLists.txt
===================================================================
--- tools/debugserver/source/CMakeLists.txt
+++ tools/debugserver/source/CMakeLists.txt
@@ -34,9 +34,11 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-extended-offsetof")
 endif ()
 
-add_definitions(
-  -DDEBUGSERVER_VERSION_STR="${LLDB_VERSION}"
-  )
+if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
+  add_definitions(
+    -DDEBUGSERVER_VERSION_STR="${LLDB_VERSION}"
+    )
+endif ()
 
 add_library(lldbDebugserverCommon
   #${dnbconfig_header}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11450.30455.patch
Type: text/x-patch
Size: 1493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150723/decb4205/attachment.bin>


More information about the lldb-commits mailing list