[Lldb-commits] [PATCH] D85770: Build a flat LLDB.framework for embedded Darwin targets

2021-03-01 Thread Shoaib Meenai via Phabricator via lldb-commits
smeenai added inline comments.



Comment at: lldb/cmake/modules/LLDBFramework.cmake:142-147
+  add_custom_command(TARGET liblldb POST_BUILD
+COMMAND ${CMAKE_COMMAND} -E create_symlink
+Versions/Current/XPCServices
+${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/XPCServices
+COMMENT "LLDB.framework: create symlink XPCServices"
+  )

vsk wrote:
> smeenai wrote:
> > This bit appears to have been introduced by this revision, without any 
> > equivalent existing before. This is causing issues for us when we build an 
> > LLDB framework in LLVM 12, because `Versions/Current/XPCServices` doesn't 
> > exist, so the created symlink is dangling. Is there some other target which 
> > should be creating that directory? (This is the only instance of 
> > `XPCServices` I see in LLDB's build.)
> Thanks for catching this. I'm curious how you spotted this. It looks like we 
> do have a target that sets up this directory, but that it's not upstream. It 
> should be safe to remove this; we can reapply the change downstream if that 
> happens.
There's a part of our build/distribution infrastructure which checksums the 
built directory, and it failed for LLVM 12 because it tried to follow the 
dangling symlink. I put up D97701 to remove this; thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85770/new/

https://reviews.llvm.org/D85770

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D85770: Build a flat LLDB.framework for embedded Darwin targets

2021-02-26 Thread Vedant Kumar via Phabricator via lldb-commits
vsk added inline comments.



Comment at: lldb/cmake/modules/LLDBFramework.cmake:142-147
+  add_custom_command(TARGET liblldb POST_BUILD
+COMMAND ${CMAKE_COMMAND} -E create_symlink
+Versions/Current/XPCServices
+${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/XPCServices
+COMMENT "LLDB.framework: create symlink XPCServices"
+  )

smeenai wrote:
> This bit appears to have been introduced by this revision, without any 
> equivalent existing before. This is causing issues for us when we build an 
> LLDB framework in LLVM 12, because `Versions/Current/XPCServices` doesn't 
> exist, so the created symlink is dangling. Is there some other target which 
> should be creating that directory? (This is the only instance of 
> `XPCServices` I see in LLDB's build.)
Thanks for catching this. I'm curious how you spotted this. It looks like we do 
have a target that sets up this directory, but that it's not upstream. It 
should be safe to remove this; we can reapply the change downstream if that 
happens.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85770/new/

https://reviews.llvm.org/D85770

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D85770: Build a flat LLDB.framework for embedded Darwin targets

2021-02-26 Thread Shoaib Meenai via Phabricator via lldb-commits
smeenai added inline comments.



Comment at: lldb/cmake/modules/LLDBFramework.cmake:142-147
+  add_custom_command(TARGET liblldb POST_BUILD
+COMMAND ${CMAKE_COMMAND} -E create_symlink
+Versions/Current/XPCServices
+${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/XPCServices
+COMMENT "LLDB.framework: create symlink XPCServices"
+  )

This bit appears to have been introduced by this revision, without any 
equivalent existing before. This is causing issues for us when we build an LLDB 
framework in LLVM 12, because `Versions/Current/XPCServices` doesn't exist, so 
the created symlink is dangling. Is there some other target which should be 
creating that directory? (This is the only instance of `XPCServices` I see in 
LLDB's build.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85770/new/

https://reviews.llvm.org/D85770

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D85770: Build a flat LLDB.framework for embedded Darwin targets

2020-08-12 Thread Vedant Kumar via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd49aedd315e3: Build a flat LLDB.framework for embedded 
Darwin targets (authored by vsk).

Changed prior to commit:
  https://reviews.llvm.org/D85770?vs=284849&id=285174#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85770/new/

https://reviews.llvm.org/D85770

Files:
  lldb/cmake/modules/LLDBConfig.cmake
  lldb/cmake/modules/LLDBFramework.cmake
  lldb/source/Host/CMakeLists.txt
  lldb/tools/debugserver/source/CMakeLists.txt
  lldb/tools/lldb-server/CMakeLists.txt
  lldb/unittests/debugserver/CMakeLists.txt

Index: lldb/unittests/debugserver/CMakeLists.txt
===
--- lldb/unittests/debugserver/CMakeLists.txt
+++ lldb/unittests/debugserver/CMakeLists.txt
@@ -21,7 +21,7 @@
   ${LLDB_SOURCE_DIR}/tools/debugserver/source
   ${LLDB_SOURCE_DIR}/tools/debugserver/source/MacOSX)
 
-if(IOS)
+if(APPLE_EMBEDDED)
   set_property(TARGET debugserverTests APPEND PROPERTY COMPILE_DEFINITIONS
   WITH_LOCKDOWN
   WITH_FBS
Index: lldb/tools/lldb-server/CMakeLists.txt
===
--- lldb/tools/lldb-server/CMakeLists.txt
+++ lldb/tools/lldb-server/CMakeLists.txt
@@ -16,7 +16,7 @@
   list(APPEND LLDB_PLUGINS lldbPluginObjectFileELF)
 endif()
 
-if(IOS)
+if(APPLE_EMBEDDED)
   if(LLDB_CODESIGN_IDENTITY)
 # Use explicit LLDB identity
 set(LLVM_CODESIGNING_IDENTITY ${LLDB_CODESIGN_IDENTITY})
Index: lldb/tools/debugserver/source/CMakeLists.txt
===
--- lldb/tools/debugserver/source/CMakeLists.txt
+++ lldb/tools/debugserver/source/CMakeLists.txt
@@ -99,7 +99,7 @@
   LLDB_DEBUGSERVER_CODESIGN_IDENTITY ${debugserver_codesign_identity})
 
 if(APPLE)
-  if(IOS)
+  if(APPLE_EMBEDDED)
 find_library(BACKBOARD_LIBRARY BackBoardServices
   PATHS ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks)
 find_library(FRONTBOARD_LIBRARY FrontBoardServices
@@ -121,7 +121,7 @@
 endif()
 
 if(LLDB_USE_ENTITLEMENTS)
-  if(IOS)
+  if(APPLE_EMBEDDED)
 set(entitlements ${CMAKE_CURRENT_SOURCE_DIR}/debugserver-entitlements.plist)
   else()
 # Same entitlements file as used for lldb-server
@@ -260,7 +260,7 @@
 
 set_target_properties(debugserver PROPERTIES FOLDER "lldb libraries/debugserver")
 
-if(IOS)
+if(APPLE_EMBEDDED)
   set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_DEFINITIONS
 WITH_LOCKDOWN
 WITH_FBS
Index: lldb/source/Host/CMakeLists.txt
===
--- lldb/source/Host/CMakeLists.txt
+++ lldb/source/Host/CMakeLists.txt
@@ -93,7 +93,7 @@
   macosx/cfcpp/CFCMutableSet.cpp
   macosx/cfcpp/CFCString.cpp
   )
-if(IOS)
+if(APPLE_EMBEDDED)
   set_property(SOURCE macosx/Host.mm APPEND PROPERTY
COMPILE_DEFINITIONS "NO_XPC_SERVICES=1")
 endif()
Index: lldb/cmake/modules/LLDBFramework.cmake
===
--- lldb/cmake/modules/LLDBFramework.cmake
+++ lldb/cmake/modules/LLDBFramework.cmake
@@ -3,22 +3,38 @@
 message(STATUS "LLDB.framework: resources subdirectory is 'Versions/${LLDB_FRAMEWORK_VERSION}/Resources'")
 
 # Configure liblldb as a framework bundle
-set_target_properties(liblldb PROPERTIES
-  FRAMEWORK ON
-  FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
+if(NOT APPLE_EMBEDDED)
+  set_target_properties(liblldb PROPERTIES
+FRAMEWORK ON
+FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
 
-  OUTPUT_NAME LLDB
-  VERSION ${LLDB_VERSION}
-  LIBRARY_OUTPUT_DIRECTORY ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
+OUTPUT_NAME LLDB
+VERSION ${LLDB_VERSION}
+LIBRARY_OUTPUT_DIRECTORY ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
 
-  # Compatibility version
-  SOVERSION "1.0.0"
+# Compatibility version
+SOVERSION "1.0.0"
 
-  MACOSX_FRAMEWORK_IDENTIFIER com.apple.LLDB.framework
-  MACOSX_FRAMEWORK_BUNDLE_VERSION ${LLDB_VERSION}
-  MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${LLDB_VERSION}
-  MACOSX_FRAMEWORK_INFO_PLIST ${LLDB_SOURCE_DIR}/resources/LLDB-Info.plist.in
-)
+MACOSX_FRAMEWORK_IDENTIFIER com.apple.LLDB.framework
+MACOSX_FRAMEWORK_BUNDLE_VERSION ${LLDB_VERSION}
+MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${LLDB_VERSION}
+MACOSX_FRAMEWORK_INFO_PLIST ${LLDB_SOURCE_DIR}/resources/LLDB-Info.plist.in
+  )
+else()
+  set_target_properties(liblldb PROPERTIES
+FRAMEWORK ON
+FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
+
+# Note: iOS doesn't specify version, as the framework layout is flat.
+OUTPUT_NAME LLDB
+LIBRARY_OUTPUT_DIRECTORY ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
+
+MACOSX_FRAMEWORK_IDENTIFIER com.apple.LLDB.framework
+MACOSX_FRAMEWORK_BUNDLE_VERSION ${LLDB_VERSION}
+MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${LLDB_VERSION}
+MACOSX_FRAMEWORK_INFO_PLIST ${LLDB_SOURCE_DIR}/resources/LLDB

[Lldb-commits] [PATCH] D85770: Build a flat LLDB.framework for embedded Darwin targets

2020-08-11 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

Thanks!




Comment at: lldb/cmake/modules/LLDBFramework.cmake:6-37
+if(NOT APPLE_EMBEDDED)
+  set_target_properties(liblldb PROPERTIES
+FRAMEWORK ON
+FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
 
-  OUTPUT_NAME LLDB
-  VERSION ${LLDB_VERSION}
-  LIBRARY_OUTPUT_DIRECTORY ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
+OUTPUT_NAME LLDB
+VERSION ${LLDB_VERSION}

vsk wrote:
> JDevlieghere wrote:
> > I //think// you should be able to do this. 
> I've tried factoring out the value for the VERSION property in the past and, 
> if memory serves, this resulted in an unusable framework on iOS. I'd rather 
> hold off on this for now.
Alright, makes sense. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85770/new/

https://reviews.llvm.org/D85770

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D85770: Build a flat LLDB.framework for embedded Darwin targets

2020-08-11 Thread Vedant Kumar via Phabricator via lldb-commits
vsk added inline comments.



Comment at: lldb/cmake/modules/LLDBFramework.cmake:6-37
+if(NOT APPLE_EMBEDDED)
+  set_target_properties(liblldb PROPERTIES
+FRAMEWORK ON
+FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
 
-  OUTPUT_NAME LLDB
-  VERSION ${LLDB_VERSION}
-  LIBRARY_OUTPUT_DIRECTORY ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
+OUTPUT_NAME LLDB
+VERSION ${LLDB_VERSION}

JDevlieghere wrote:
> I //think// you should be able to do this. 
I've tried factoring out the value for the VERSION property in the past and, if 
memory serves, this resulted in an unusable framework on iOS. I'd rather hold 
off on this for now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85770/new/

https://reviews.llvm.org/D85770

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D85770: Build a flat LLDB.framework for embedded Darwin targets

2020-08-11 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments.



Comment at: lldb/cmake/modules/LLDBFramework.cmake:6-37
+if(NOT APPLE_EMBEDDED)
+  set_target_properties(liblldb PROPERTIES
+FRAMEWORK ON
+FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
 
-  OUTPUT_NAME LLDB
-  VERSION ${LLDB_VERSION}
-  LIBRARY_OUTPUT_DIRECTORY ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
+OUTPUT_NAME LLDB
+VERSION ${LLDB_VERSION}

I //think// you should be able to do this. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85770/new/

https://reviews.llvm.org/D85770

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D85770: Build a flat LLDB.framework for embedded Darwin targets

2020-08-11 Thread Vedant Kumar via Phabricator via lldb-commits
vsk created this revision.
vsk added reviewers: JDevlieghere, davide, friss.
Herald added a subscriber: mgorny.
Herald added a project: LLDB.
vsk requested review of this revision.

This patch configures LLDB.framework to build as a flat unversioned
framework on non-macOS Darwin targets, which have never supported the
macOS framework layout.

This patch also renames the 'IOS' cmake variable to 'APPLE_EMBEDDED' to
reflect the fact that lldb is built for several different kinds of embedded
Darwin targets, not just iOS.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85770

Files:
  lldb/cmake/modules/LLDBConfig.cmake
  lldb/cmake/modules/LLDBFramework.cmake
  lldb/source/Host/CMakeLists.txt
  lldb/tools/debugserver/source/CMakeLists.txt
  lldb/tools/lldb-server/CMakeLists.txt
  lldb/unittests/debugserver/CMakeLists.txt

Index: lldb/unittests/debugserver/CMakeLists.txt
===
--- lldb/unittests/debugserver/CMakeLists.txt
+++ lldb/unittests/debugserver/CMakeLists.txt
@@ -20,7 +20,7 @@
 Support
   )
 
-if(IOS)
+if(APPLE_EMBEDDED)
   set_property(TARGET debugserverTests APPEND PROPERTY COMPILE_DEFINITIONS
   WITH_LOCKDOWN
   WITH_FBS
Index: lldb/tools/lldb-server/CMakeLists.txt
===
--- lldb/tools/lldb-server/CMakeLists.txt
+++ lldb/tools/lldb-server/CMakeLists.txt
@@ -16,7 +16,7 @@
   list(APPEND LLDB_PLUGINS lldbPluginObjectFileELF)
 endif()
 
-if(IOS)
+if(APPLE_EMBEDDED)
   if(LLDB_CODESIGN_IDENTITY)
 # Use explicit LLDB identity
 set(LLVM_CODESIGNING_IDENTITY ${LLDB_CODESIGN_IDENTITY})
Index: lldb/tools/debugserver/source/CMakeLists.txt
===
--- lldb/tools/debugserver/source/CMakeLists.txt
+++ lldb/tools/debugserver/source/CMakeLists.txt
@@ -99,7 +99,7 @@
   LLDB_DEBUGSERVER_CODESIGN_IDENTITY ${debugserver_codesign_identity})
 
 if(APPLE)
-  if(IOS)
+  if(APPLE_EMBEDDED)
 find_library(BACKBOARD_LIBRARY BackBoardServices
   PATHS ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks)
 find_library(FRONTBOARD_LIBRARY FrontBoardServices
@@ -121,7 +121,7 @@
 endif()
 
 if(LLDB_USE_ENTITLEMENTS)
-  if(IOS)
+  if(APPLE_EMBEDDED)
 set(entitlements ${CMAKE_CURRENT_SOURCE_DIR}/debugserver-entitlements.plist)
   else()
 # Same entitlements file as used for lldb-server
@@ -258,7 +258,7 @@
 
 set_target_properties(debugserver PROPERTIES FOLDER "lldb libraries/debugserver")
 
-if(IOS)
+if(APPLE_EMBEDDED)
   set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_DEFINITIONS
 WITH_LOCKDOWN
 WITH_FBS
Index: lldb/source/Host/CMakeLists.txt
===
--- lldb/source/Host/CMakeLists.txt
+++ lldb/source/Host/CMakeLists.txt
@@ -93,7 +93,7 @@
   macosx/cfcpp/CFCMutableSet.cpp
   macosx/cfcpp/CFCString.cpp
   )
-if(IOS)
+if(APPLE_EMBEDDED)
   set_property(SOURCE macosx/Host.mm APPEND PROPERTY
COMPILE_DEFINITIONS "NO_XPC_SERVICES=1")
 endif()
Index: lldb/cmake/modules/LLDBFramework.cmake
===
--- lldb/cmake/modules/LLDBFramework.cmake
+++ lldb/cmake/modules/LLDBFramework.cmake
@@ -3,22 +3,38 @@
 message(STATUS "LLDB.framework: resources subdirectory is 'Versions/${LLDB_FRAMEWORK_VERSION}/Resources'")
 
 # Configure liblldb as a framework bundle
-set_target_properties(liblldb PROPERTIES
-  FRAMEWORK ON
-  FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
+if(NOT APPLE_EMBEDDED)
+  set_target_properties(liblldb PROPERTIES
+FRAMEWORK ON
+FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
 
-  OUTPUT_NAME LLDB
-  VERSION ${LLDB_VERSION}
-  LIBRARY_OUTPUT_DIRECTORY ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
+OUTPUT_NAME LLDB
+VERSION ${LLDB_VERSION}
+LIBRARY_OUTPUT_DIRECTORY ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
 
-  # Compatibility version
-  SOVERSION "1.0.0"
+# Compatibility version
+SOVERSION "1.0.0"
 
-  MACOSX_FRAMEWORK_IDENTIFIER com.apple.LLDB.framework
-  MACOSX_FRAMEWORK_BUNDLE_VERSION ${LLDB_VERSION}
-  MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${LLDB_VERSION}
-  MACOSX_FRAMEWORK_INFO_PLIST ${LLDB_SOURCE_DIR}/resources/LLDB-Info.plist.in
-)
+MACOSX_FRAMEWORK_IDENTIFIER com.apple.LLDB.framework
+MACOSX_FRAMEWORK_BUNDLE_VERSION ${LLDB_VERSION}
+MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${LLDB_VERSION}
+MACOSX_FRAMEWORK_INFO_PLIST ${LLDB_SOURCE_DIR}/resources/LLDB-Info.plist.in
+  )
+else()
+  set_target_properties(liblldb PROPERTIES
+FRAMEWORK ON
+FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
+
+# Note: iOS doesn't specify version, as the framework layout is flat.
+OUTPUT_NAME LLDB
+LIBRARY_OUTPUT_DIRECTORY ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
+
+MACOSX_FRAMEWORK_IDENTIFIER com.apple.LLDB.framework
+MACOSX_FRAMEWORK_BUNDLE_VERSION ${LLDB_VERSION}
+MACOSX_FRAMEW