[Lldb-commits] [lldb] 969eefd - [lldb] add LLDB_SKIP_DSYM option

Shoaib Meenai via lldb-commits lldb-commits at lists.llvm.org
Wed May 26 09:33:16 PDT 2021


Author: Richard Howell
Date: 2021-05-26T09:32:59-07:00
New Revision: 969eefd98e0f8e485148be61190cc2ef62fb1eca

URL: https://github.com/llvm/llvm-project/commit/969eefd98e0f8e485148be61190cc2ef62fb1eca
DIFF: https://github.com/llvm/llvm-project/commit/969eefd98e0f8e485148be61190cc2ef62fb1eca.diff

LOG: [lldb] add LLDB_SKIP_DSYM option

Add an option to skip generating a dSYM when installing the LLDB framework on Darwin.

Reviewed By: smeenai

Differential Revision: https://reviews.llvm.org/D103124

Added: 
    

Modified: 
    lldb/cmake/modules/AddLLDB.cmake
    lldb/cmake/modules/LLDBConfig.cmake

Removed: 
    


################################################################################
diff  --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake
index 4ed5c647c5d2a..8be214a8509a5 100644
--- a/lldb/cmake/modules/AddLLDB.cmake
+++ b/lldb/cmake/modules/AddLLDB.cmake
@@ -276,19 +276,21 @@ function(lldb_add_post_install_steps_darwin name install_prefix)
   endif()
 
   # Generate dSYM
-  set(dsym_name ${output_name}.dSYM)
-  if(is_framework)
-    set(dsym_name ${output_name}.framework.dSYM)
-  endif()
-  if(LLDB_DEBUGINFO_INSTALL_PREFIX)
-    # This makes the path absolute, so we must respect DESTDIR.
-    set(dsym_name "\$ENV\{DESTDIR\}${LLDB_DEBUGINFO_INSTALL_PREFIX}/${dsym_name}")
-  endif()
+  if(NOT LLDB_SKIP_DSYM)
+    set(dsym_name ${output_name}.dSYM)
+    if(is_framework)
+      set(dsym_name ${output_name}.framework.dSYM)
+    endif()
+    if(LLDB_DEBUGINFO_INSTALL_PREFIX)
+      # This makes the path absolute, so we must respect DESTDIR.
+      set(dsym_name "\$ENV\{DESTDIR\}${LLDB_DEBUGINFO_INSTALL_PREFIX}/${dsym_name}")
+    endif()
 
-  set(buildtree_name ${buildtree_dir}/${bundle_subdir}${output_name})
-  install(CODE "message(STATUS \"Externalize debuginfo: ${dsym_name}\")" COMPONENT ${name})
-  install(CODE "execute_process(COMMAND xcrun dsymutil -o=${dsym_name} ${buildtree_name})"
-          COMPONENT ${name})
+    set(buildtree_name ${buildtree_dir}/${bundle_subdir}${output_name})
+    install(CODE "message(STATUS \"Externalize debuginfo: ${dsym_name}\")" COMPONENT ${name})
+    install(CODE "execute_process(COMMAND xcrun dsymutil -o=${dsym_name} ${buildtree_name})"
+            COMPONENT ${name})
+  endif()
 
   if(NOT LLDB_SKIP_STRIP)
     # Strip distribution binary with -ST (removing debug symbol table entries and

diff  --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index 2fdf1502d0559..b62cd7d24438f 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -65,6 +65,7 @@ option(LLDB_BUILD_FRAMEWORK "Build LLDB.framework (Darwin only)" OFF)
 option(LLDB_NO_INSTALL_DEFAULT_RPATH "Disable default RPATH settings in binaries" OFF)
 option(LLDB_USE_SYSTEM_DEBUGSERVER "Use the system's debugserver for testing (Darwin only)." OFF)
 option(LLDB_SKIP_STRIP "Whether to skip stripping of binaries when installing lldb." OFF)
+option(LLDB_SKIP_DSYM "Whether to skip generating a dSYM when installing lldb." OFF)
 
 if (LLDB_USE_SYSTEM_DEBUGSERVER)
   # The custom target for the system debugserver has no install target, so we


        


More information about the lldb-commits mailing list