[Lldb-commits] [PATCH] lldb: don't hardcode path to codesign_allocate

Kuba Brecka kuba.brecka at gmail.com
Sun Jun 15 17:52:30 PDT 2014


Building OS X debugserver assumes you have an Xcode installation at /Application/Xcode.app. Let's instead detect where Xcode is using xcrun.

http://reviews.llvm.org/D4152

Files:
  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
@@ -52,7 +52,11 @@
 
 # Sign the debugserver binary
 set (CODESIGN_IDENTITY lldb_codesign)
-set (CODESIGN_ALLOCATE /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate)
+execute_process(
+  COMMAND xcrun -f codesign_allocate
+  OUTPUT_STRIP_TRAILING_WHITESPACE
+  OUTPUT_VARIABLE CODESIGN_ALLOCATE
+  )
 add_custom_command(TARGET debugserver
   POST_BUILD
   COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign ${CODESIGN_IDENTITY} debugserver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4152.10435.patch
Type: text/x-patch
Size: 816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140616/948395e8/attachment.bin>


More information about the lldb-commits mailing list