Commit 610f80f7 authored by Vedant Kumar's avatar Vedant Kumar
Browse files

[cmake] Add an option to skip stripping before install

The swift build system has support for cross-compiling, installing, and
generating symbols for lldb. As the swift symbol-generation step occurs
after installation, we need to disable stripping during the install.
parent 6db7a5cd
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -284,6 +284,7 @@ function(lldb_add_post_install_steps_darwin name install_prefix)
  install(CODE "execute_process(COMMAND xcrun dsymutil -o=${dsym_name} ${buildtree_name})"
          COMPONENT ${name})

  if(NOT LLDB_SKIP_STRIP)
    # Strip distribution binary with -ST (removing debug symbol table entries and
    # Swift symbols). Avoid CMAKE_INSTALL_DO_STRIP and llvm_externalize_debuginfo()
    # as they can't be configured sufficiently.
@@ -291,6 +292,7 @@ function(lldb_add_post_install_steps_darwin name install_prefix)
    install(CODE "message(STATUS \"Stripping: ${installtree_name}\")" COMPONENT ${name})
    install(CODE "execute_process(COMMAND xcrun strip -ST ${installtree_name})"
            COMPONENT ${name})
  endif()
endfunction()

# CMake's set_target_properties() doesn't allow to pass lists for RPATH
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" O
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)

if(LLDB_BUILD_FRAMEWORK)
  if(NOT APPLE)