[Lldb-commits] [PATCH] D103124: [lldb] add LLDB_SKIP_DSYM option

2021-05-25 Thread Richard Howell via Phabricator via lldb-commits
rmaz created this revision.
Herald added a subscriber: mgorny.
rmaz requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103124

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


Index: lldb/cmake/modules/LLDBConfig.cmake
===
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -65,6 +65,7 @@
 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
Index: lldb/cmake/modules/AddLLDB.cmake
===
--- lldb/cmake/modules/AddLLDB.cmake
+++ lldb/cmake/modules/AddLLDB.cmake
@@ -276,19 +276,21 @@
   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


Index: lldb/cmake/modules/LLDBConfig.cmake
===
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -65,6 +65,7 @@
 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
Index: lldb/cmake/modules/AddLLDB.cmake
===
--- lldb/cmake/modules/AddLLDB.cmake
+++ lldb/cmake/modules/AddLLDB.cmake
@@ -276,19 +276,21 @@
   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 (r

[Lldb-commits] [PATCH] D103124: [lldb] add LLDB_SKIP_DSYM option

2021-05-26 Thread Richard Howell via Phabricator via lldb-commits
rmaz added a comment.

In D103124#2780955 , @smeenai wrote:

> Swift's LLDB fork has a TODO for this :) CC @sgraenitz, who added that TODO.
>
> LGTM. Do you need this to be committed for you?

If you could, thanks


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103124

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


[Lldb-commits] [PATCH] D97227: [lldb] add check for libcxx runtime

2021-02-22 Thread Richard Howell via Phabricator via lldb-commits
rmaz created this revision.
Herald added a subscriber: mgorny.
rmaz requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

When enabling LLDB tests with `LLVM_ENABLE_RUNTIMES=libcxx` CMake will fail 
with:

  LLDB test suite requires libc++, but it is currently disabled. 

This change adds support for tests to use the libcxx runtime too.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97227

Files:
  lldb/test/CMakeLists.txt


Index: lldb/test/CMakeLists.txt
===
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -106,7 +106,7 @@
 else()
   # We require libcxx for the test suite, so if we aren't building it,
   # try to provide a helpful error about how to resolve the situation.
-  if(NOT TARGET cxx)
+  if(NOT TARGET cxx AND NOT libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
 if(LLVM_ENABLE_PROJECTS STREQUAL "")
   # If `LLVM_ENABLE_PROJECTS` is not being used (implying that we are
   # using the old layout), suggest checking it out.


Index: lldb/test/CMakeLists.txt
===
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -106,7 +106,7 @@
 else()
   # We require libcxx for the test suite, so if we aren't building it,
   # try to provide a helpful error about how to resolve the situation.
-  if(NOT TARGET cxx)
+  if(NOT TARGET cxx AND NOT libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
 if(LLVM_ENABLE_PROJECTS STREQUAL "")
   # If `LLVM_ENABLE_PROJECTS` is not being used (implying that we are
   # using the old layout), suggest checking it out.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D97227: [lldb] add check for libcxx runtime

2021-02-22 Thread Richard Howell via Phabricator via lldb-commits
rmaz added a comment.

In D97227#2580049 , @smeenai wrote:

> My understanding of the issue is that, with the runtimes build, the `cxx` 
> target will get created after we process LLDB's build files. The `TARGET cxx` 
> check here will therefore fail, but the `cxx` target will end up existing 
> later, and CMake is perfectly fine adding a dependency to a target that gets 
> created later, so the failing check is spurious. The `libcxx IN_LIST 
> LLVM_ENABLE_RUNTIMES` is basically a proxy for "the `cxx` target doesn't 
> exist right now but will exist later". Could you add an explanation of the 
> issue to the summary or the code comment?

I updated the summary, any clearer?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97227

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


[Lldb-commits] [PATCH] D97227: [lldb] add check for libcxx runtime

2021-02-22 Thread Richard Howell via Phabricator via lldb-commits
rmaz updated this revision to Diff 325600.
rmaz added a comment.

update comment


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97227

Files:
  lldb/test/CMakeLists.txt


Index: lldb/test/CMakeLists.txt
===
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -106,7 +106,7 @@
 else()
   # We require libcxx for the test suite, so if we aren't building it,
   # try to provide a helpful error about how to resolve the situation.
-  if(NOT TARGET cxx)
+  if(NOT TARGET cxx AND NOT libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
 if(LLVM_ENABLE_PROJECTS STREQUAL "")
   # If `LLVM_ENABLE_PROJECTS` is not being used (implying that we are
   # using the old layout), suggest checking it out.
@@ -118,8 +118,9 @@
   # If `LLVM_ENABLE_PROJECTS` is being used, suggest adding it.
   message(FATAL_ERROR
 "LLDB test suite requires libc++, but it is currently disabled. "
-"Please add `libcxx` to `LLVM_ENABLE_PROJECTS` or disable tests "
-"via `LLDB_INCLUDE_TESTS=OFF`.")
+"Please add `libcxx` to `LLVM_ENABLE_PROJECTS` or "
+"`LLVM_ENABLE_RUNTIMES`, or disable tests via "
+"`LLDB_INCLUDE_TESTS=OFF`.")
 endif()
   endif()
   add_lldb_test_dependency(cxx)


Index: lldb/test/CMakeLists.txt
===
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -106,7 +106,7 @@
 else()
   # We require libcxx for the test suite, so if we aren't building it,
   # try to provide a helpful error about how to resolve the situation.
-  if(NOT TARGET cxx)
+  if(NOT TARGET cxx AND NOT libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
 if(LLVM_ENABLE_PROJECTS STREQUAL "")
   # If `LLVM_ENABLE_PROJECTS` is not being used (implying that we are
   # using the old layout), suggest checking it out.
@@ -118,8 +118,9 @@
   # If `LLVM_ENABLE_PROJECTS` is being used, suggest adding it.
   message(FATAL_ERROR
 "LLDB test suite requires libc++, but it is currently disabled. "
-"Please add `libcxx` to `LLVM_ENABLE_PROJECTS` or disable tests "
-"via `LLDB_INCLUDE_TESTS=OFF`.")
+"Please add `libcxx` to `LLVM_ENABLE_PROJECTS` or "
+"`LLVM_ENABLE_RUNTIMES`, or disable tests via "
+"`LLDB_INCLUDE_TESTS=OFF`.")
 endif()
   endif()
   add_lldb_test_dependency(cxx)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D90857: [lldb] add a missing dependency on intrinsics_gen

2020-11-19 Thread Richard Howell via Phabricator via lldb-commits
rmaz added a comment.

> I'd still like to hear an explanation on how is this patch relevant (in this 
> repository).

Apologies, missed the last notification.

> Judging by the error message, this dependency is not correct even in the 
> swift fork. lldbSymbol does not have a direct dependency on llvmIR. It has a 
> dependency on swift (through SwiftASTContext), and swift (through 
> AST/Builtins.h) has a dependency on the generated headers.

Correct.

> So, the right fix should be to add a lldbSymbol->Swift dependency (if one 
> isn't there already), and then a swift->LLVMIR dep.

This sounds reasonable, the Swift build script seems to enforce a similar 
compilation order of:

1. LLVM & Clang
2. Swift
3. LLDB

There are some existing dependencies on Swift libs in standalone mode, let me 
take a look at this approach instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90857

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


[Lldb-commits] [PATCH] D80659: [lldb-vscode] Redirect stderr and stdout to DAPs console message

2020-06-01 Thread Richard Howell via Phabricator via lldb-commits
rmaz added a comment.



In D80659#2062304 , @labath wrote:

> Btw, given that Richard has found some vscode code which already tries to 
> send stderr to the console window 
> https://github.com/microsoft/vscode/blob/master/src/vs/workbench/contrib/debug/node/debugAdapter.ts#L234,
>  it would be good to first understand why doesn't that kick in. Maybe there's 
> a vscode bug that could be fixed instead.


The issue is fairly clear, that listener is only added if the optional 
constructor arg `outputService` is defined, but it never is. I was planning on 
putting up a diff this week some time to always read from stderr regardless.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80659



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