[Lldb-commits] [PATCH] D47678: [lldb, lldm-mi] Fix hanging of -exec-run command.

2018-06-03 Thread Alexander Polyakov via Phabricator via lldb-commits
polyakov.alex updated this revision to Diff 149626.
polyakov.alex added a comment.

Added the test.


https://reviews.llvm.org/D47678

Files:
  lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
  lit/tools/lldb-mi/exec/lit.local.cfg
  tools/lldb-mi/MICmdCmdExec.cpp


Index: tools/lldb-mi/MICmdCmdExec.cpp
===
--- tools/lldb-mi/MICmdCmdExec.cpp
+++ tools/lldb-mi/MICmdCmdExec.cpp
@@ -99,6 +99,19 @@
 bool CMICmdCmdExecRun::Execute() {
   CMICmnLLDBDebugSessionInfo &rSessionInfo(
   CMICmnLLDBDebugSessionInfo::Instance());
+
+  {
+// Check we have a valid target.
+// Note: target created via 'file-exec-and-symbols' command.
+lldb::SBTarget sbTarget = rSessionInfo.GetTarget();
+if (!sbTarget.IsValid() ||
+sbTarget == rSessionInfo.GetDebugger().GetDummyTarget()) {
+  
SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_CURRENT),
+ m_cmdData.strMiCmd.c_str()));
+  return MIstatus::failure;
+}
+  }
+
   lldb::SBError error;
   lldb::SBStream errMsg;
   lldb::SBLaunchInfo launchInfo = rSessionInfo.GetTarget().GetLaunchInfo();
Index: lit/tools/lldb-mi/exec/lit.local.cfg
===
--- /dev/null
+++ lit/tools/lldb-mi/exec/lit.local.cfg
@@ -0,0 +1 @@
+config.suffixes = ['.test']
Index: lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
===
--- /dev/null
+++ lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
@@ -0,0 +1,6 @@
+# RUN: %lldbmi < %s | FileCheck %s
+
+# Test that -exec-run command won't hang in case of wrong name of binary file.
+
+-file-exec-and-symbols name.exe
+# CHECK: ^error,msg="Command 'file-exec-and-symbols'. Target binary 'name.exe' 
is invalid.


Index: tools/lldb-mi/MICmdCmdExec.cpp
===
--- tools/lldb-mi/MICmdCmdExec.cpp
+++ tools/lldb-mi/MICmdCmdExec.cpp
@@ -99,6 +99,19 @@
 bool CMICmdCmdExecRun::Execute() {
   CMICmnLLDBDebugSessionInfo &rSessionInfo(
   CMICmnLLDBDebugSessionInfo::Instance());
+
+  {
+// Check we have a valid target.
+// Note: target created via 'file-exec-and-symbols' command.
+lldb::SBTarget sbTarget = rSessionInfo.GetTarget();
+if (!sbTarget.IsValid() ||
+sbTarget == rSessionInfo.GetDebugger().GetDummyTarget()) {
+  SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_CURRENT),
+ m_cmdData.strMiCmd.c_str()));
+  return MIstatus::failure;
+}
+  }
+
   lldb::SBError error;
   lldb::SBStream errMsg;
   lldb::SBLaunchInfo launchInfo = rSessionInfo.GetTarget().GetLaunchInfo();
Index: lit/tools/lldb-mi/exec/lit.local.cfg
===
--- /dev/null
+++ lit/tools/lldb-mi/exec/lit.local.cfg
@@ -0,0 +1 @@
+config.suffixes = ['.test']
Index: lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
===
--- /dev/null
+++ lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
@@ -0,0 +1,6 @@
+# RUN: %lldbmi < %s | FileCheck %s
+
+# Test that -exec-run command won't hang in case of wrong name of binary file.
+
+-file-exec-and-symbols name.exe
+# CHECK: ^error,msg="Command 'file-exec-and-symbols'. Target binary 'name.exe' is invalid.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows.

2018-06-03 Thread Alexander Polyakov via Phabricator via lldb-commits
polyakov.alex updated this revision to Diff 149629.
polyakov.alex added a comment.

Due to https://reviews.llvm.org/D47678 we can enable this test with a XFAIL 
directive for Windows.


https://reviews.llvm.org/D47679

Files:
  lit/tools/lldb-mi/breakpoint/break-insert.test


Index: lit/tools/lldb-mi/breakpoint/break-insert.test
===
--- lit/tools/lldb-mi/breakpoint/break-insert.test
+++ lit/tools/lldb-mi/breakpoint/break-insert.test
@@ -1,16 +1,15 @@
-# REQUIRES: nowindows
+# XFAIL: windows
 # -> llvm.org/pr24452
-# Rather than XFAILing the test, skip it on Windows because it hangs
-
-# RUN: %cc %p/inputs/break-insert.c -g
+#
+# RUN: %cc -o a.exe %p/inputs/break-insert.c -g
 # RUN: %lldbmi < %s | FileCheck %s
 
 # Test that a breakpoint can be inserted before creating a target.
 
 -break-insert breakpoint
 # CHECK: ^done,bkpt={number="1"
 
--file-exec-and-symbols a.out
+-file-exec-and-symbols a.exe
 # CHECK: ^done
 
 -exec-run


Index: lit/tools/lldb-mi/breakpoint/break-insert.test
===
--- lit/tools/lldb-mi/breakpoint/break-insert.test
+++ lit/tools/lldb-mi/breakpoint/break-insert.test
@@ -1,16 +1,15 @@
-# REQUIRES: nowindows
+# XFAIL: windows
 # -> llvm.org/pr24452
-# Rather than XFAILing the test, skip it on Windows because it hangs
-
-# RUN: %cc %p/inputs/break-insert.c -g
+#
+# RUN: %cc -o a.exe %p/inputs/break-insert.c -g
 # RUN: %lldbmi < %s | FileCheck %s
 
 # Test that a breakpoint can be inserted before creating a target.
 
 -break-insert breakpoint
 # CHECK: ^done,bkpt={number="1"
 
--file-exec-and-symbols a.out
+-file-exec-and-symbols a.exe
 # CHECK: ^done
 
 -exec-run
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows.

2018-06-03 Thread Alexander Polyakov via Phabricator via lldb-commits
polyakov.alex added a comment.

In https://reviews.llvm.org/D47679#1120039, @stella.stamenova wrote:

> You can actually follow the pattern in the other tests and do:
>
>   %cc -o %t %p/inputs/break-insert.c -g
>
> %t then becomes the name of the output file and you can use that in our other 
> commands. This is better than specifying a hardcoded name.


We can't use it here since lldb-mi reads `%s` file with input, then `%t` won't 
be changed to any path, so debugger will try to find executable with name `%t` 
and fail.


https://reviews.llvm.org/D47679



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


[Lldb-commits] [PATCH] D47678: [lldb, lldm-mi] Fix hanging of -exec-run command.

2018-06-03 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.

thanks.


https://reviews.llvm.org/D47678



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


[Lldb-commits] [PATCH] D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows.

2018-06-03 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment.

Stella, is there a public bot that runs the tests on Windows that we could 
watch? I found 
http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc2015?numbuilds=1000 but 
it doesn't look like that one actually failed with the error you saw.




Comment at: lit/tools/lldb-mi/breakpoint/break-insert.test:1
-# REQUIRES: nowindows
+# XFAIL: windows
 # -> llvm.org/pr24452

Do we still expect the test to fail after this change?


https://reviews.llvm.org/D47679



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


[Lldb-commits] [PATCH] D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows.

2018-06-03 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added inline comments.



Comment at: lit/tools/lldb-mi/breakpoint/break-insert.test:1
-# REQUIRES: nowindows
+# XFAIL: windows
 # -> llvm.org/pr24452

aprantl wrote:
> Do we still expect the test to fail after this change?
Nevermind.. phabricator folded your entire conversation away. This is about 
lldb-mi hanging after the program exit.


https://reviews.llvm.org/D47679



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


[Lldb-commits] [PATCH] D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows.

2018-06-03 Thread Stella Stamenova via Phabricator via lldb-commits
stella.stamenova added a comment.

In https://reviews.llvm.org/D47679#1120081, @polyakov.alex wrote:

> Due to https://reviews.llvm.org/D47678 we can enable this test with a XFAIL 
> directive for Windows.


Not true. As I said, the original review when I disabled the test has the log 
of what happens when you give it the correct path and the test still hangs in 
that scenario. If you XFAIL it, it will hang.

@aprantl There is currently no public not that runs the tests. The one you 
found just builds but runs no tests. I have a machine I am going to add as a 
bot but there are still a lot of failing tests, so I don’t want to add it yet 
as it will be just noise until the tests are fixed or disabled.

In https://reviews.llvm.org/D47679#1120166, @aprantl wrote:

> Stella, is there a public bot that runs the tests on Windows that we could 
> watch? I found 
> http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc2015?numbuilds=1000 
> but it doesn't look like that one actually failed with the error you saw.







Comment at: lit/tools/lldb-mi/breakpoint/break-insert.test:1
-# REQUIRES: nowindows
+# XFAIL: windows
 # -> llvm.org/pr24452

aprantl wrote:
> Do we still expect the test to fail after this change?
It will still fail and it will still hang.


https://reviews.llvm.org/D47679



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


[Lldb-commits] [PATCH] D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows.

2018-06-03 Thread Alexander Polyakov via Phabricator via lldb-commits
polyakov.alex added a comment.

In https://reviews.llvm.org/D47679#1120172, @stella.stamenova wrote:

> In https://reviews.llvm.org/D47679#1120081, @polyakov.alex wrote:
>
> > Due to https://reviews.llvm.org/D47678 we can enable this test with a XFAIL 
> > directive for Windows.
>
>
> Not true. As I said, the original review when I disabled the test has the log 
> of what happens when you give it the correct path and the test still hangs in 
> that scenario. If you XFAIL it, it will hang.


Yep, I got the same on Linux. But if you run it through llvm-lit(not `lldb-mi < 
input-file`) it won't hang.


https://reviews.llvm.org/D47679



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


[Lldb-commits] [PATCH] D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows.

2018-06-03 Thread Stella Stamenova via Phabricator via lldb-commits
stella.stamenova added a comment.

In https://reviews.llvm.org/D47679#1120177, @polyakov.alex wrote:

> In https://reviews.llvm.org/D47679#1120172, @stella.stamenova wrote:
>
> > In https://reviews.llvm.org/D47679#1120081, @polyakov.alex wrote:
> >
> > > Due to https://reviews.llvm.org/D47678 we can enable this test with a 
> > > XFAIL directive for Windows.
> >
> >
> > Not true. As I said, the original review when I disabled the test has the 
> > log of what happens when you give it the correct path and the test still 
> > hangs in that scenario. If you XFAIL it, it will hang.
>
>
> Yep, I got the same on Linux. But if you run it through llvm-lit(not `lldb-mi 
> < input-file`) it won't hang.


I can apply your change locally on Monday and double-check. You have to 
remember that the behavior of the tools and test suite is not exactly the same 
on Linux and Windows.


https://reviews.llvm.org/D47679



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


[Lldb-commits] [lldb] r333844 - [lldb, lldm-mi] Fix hanging of -exec-run command.

2018-06-03 Thread Alexander Polyakov via lldb-commits
Author: apolyakov
Date: Sun Jun  3 08:15:23 2018
New Revision: 333844

URL: http://llvm.org/viewvc/llvm-project?rev=333844&view=rev
Log:
[lldb, lldm-mi] Fix hanging of -exec-run command.

Summary: -exec-run command hanged in case of invalid or dummy target.

Reviewers: aprantl, stella.stamenova

Reviewed By: aprantl

Subscribers: ki.stfu, llvm-commits, lldb-commits

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

Added:
lldb/trunk/lit/tools/lldb-mi/exec/
lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg
Modified:
lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp

Added: lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test?rev=333844&view=auto
==
--- lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test (added)
+++ lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test Sun Jun  3 
08:15:23 2018
@@ -0,0 +1,6 @@
+# RUN: %lldbmi < %s | FileCheck %s
+
+# Test that -exec-run command won't hang in case of wrong name of binary file.
+
+-file-exec-and-symbols name.exe
+# CHECK: ^error,msg="Command 'file-exec-and-symbols'. Target binary 'name.exe' 
is invalid.

Added: lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg?rev=333844&view=auto
==
--- lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg (added)
+++ lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg Sun Jun  3 08:15:23 2018
@@ -0,0 +1 @@
+config.suffixes = ['.test']

Modified: lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp?rev=333844&r1=333843&r2=333844&view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp Sun Jun  3 08:15:23 2018
@@ -99,6 +99,19 @@ bool CMICmdCmdExecRun::ParseArgs() {
 bool CMICmdCmdExecRun::Execute() {
   CMICmnLLDBDebugSessionInfo &rSessionInfo(
   CMICmnLLDBDebugSessionInfo::Instance());
+
+  {
+// Check we have a valid target.
+// Note: target created via 'file-exec-and-symbols' command.
+lldb::SBTarget sbTarget = rSessionInfo.GetTarget();
+if (!sbTarget.IsValid() ||
+sbTarget == rSessionInfo.GetDebugger().GetDummyTarget()) {
+  
SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_CURRENT),
+ m_cmdData.strMiCmd.c_str()));
+  return MIstatus::failure;
+}
+  }
+
   lldb::SBError error;
   lldb::SBStream errMsg;
   lldb::SBLaunchInfo launchInfo = rSessionInfo.GetTarget().GetLaunchInfo();


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


[Lldb-commits] [PATCH] D47678: [lldb, lldm-mi] Fix hanging of -exec-run command.

2018-06-03 Thread Phabricator via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL333844: [lldb, lldm-mi] Fix hanging of -exec-run command. 
(authored by apolyakov, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D47678?vs=149626&id=149641#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D47678

Files:
  lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
  lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg
  lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp


Index: lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp
===
--- lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp
+++ lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp
@@ -99,6 +99,19 @@
 bool CMICmdCmdExecRun::Execute() {
   CMICmnLLDBDebugSessionInfo &rSessionInfo(
   CMICmnLLDBDebugSessionInfo::Instance());
+
+  {
+// Check we have a valid target.
+// Note: target created via 'file-exec-and-symbols' command.
+lldb::SBTarget sbTarget = rSessionInfo.GetTarget();
+if (!sbTarget.IsValid() ||
+sbTarget == rSessionInfo.GetDebugger().GetDummyTarget()) {
+  
SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_CURRENT),
+ m_cmdData.strMiCmd.c_str()));
+  return MIstatus::failure;
+}
+  }
+
   lldb::SBError error;
   lldb::SBStream errMsg;
   lldb::SBLaunchInfo launchInfo = rSessionInfo.GetTarget().GetLaunchInfo();
Index: lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
===
--- lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
+++ lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
@@ -0,0 +1,6 @@
+# RUN: %lldbmi < %s | FileCheck %s
+
+# Test that -exec-run command won't hang in case of wrong name of binary file.
+
+-file-exec-and-symbols name.exe
+# CHECK: ^error,msg="Command 'file-exec-and-symbols'. Target binary 'name.exe' 
is invalid.
Index: lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg
===
--- lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg
+++ lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg
@@ -0,0 +1 @@
+config.suffixes = ['.test']


Index: lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp
===
--- lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp
+++ lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp
@@ -99,6 +99,19 @@
 bool CMICmdCmdExecRun::Execute() {
   CMICmnLLDBDebugSessionInfo &rSessionInfo(
   CMICmnLLDBDebugSessionInfo::Instance());
+
+  {
+// Check we have a valid target.
+// Note: target created via 'file-exec-and-symbols' command.
+lldb::SBTarget sbTarget = rSessionInfo.GetTarget();
+if (!sbTarget.IsValid() ||
+sbTarget == rSessionInfo.GetDebugger().GetDummyTarget()) {
+  SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_CURRENT),
+ m_cmdData.strMiCmd.c_str()));
+  return MIstatus::failure;
+}
+  }
+
   lldb::SBError error;
   lldb::SBStream errMsg;
   lldb::SBLaunchInfo launchInfo = rSessionInfo.GetTarget().GetLaunchInfo();
Index: lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
===
--- lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
+++ lldb/trunk/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
@@ -0,0 +1,6 @@
+# RUN: %lldbmi < %s | FileCheck %s
+
+# Test that -exec-run command won't hang in case of wrong name of binary file.
+
+-file-exec-and-symbols name.exe
+# CHECK: ^error,msg="Command 'file-exec-and-symbols'. Target binary 'name.exe' is invalid.
Index: lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg
===
--- lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg
+++ lldb/trunk/lit/tools/lldb-mi/exec/lit.local.cfg
@@ -0,0 +1 @@
+config.suffixes = ['.test']
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows.

2018-06-03 Thread Alexander Polyakov via Phabricator via lldb-commits
polyakov.alex added a comment.

Thank you.


https://reviews.llvm.org/D47679



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


[Lldb-commits] [PATCH] D47302: [lldb, lldb-mi] Add method AddCurrentTargetSharedObjectPath to the SBDebugger.

2018-06-03 Thread Alexander Polyakov via Phabricator via lldb-commits
polyakov.alex added a comment.

Do you know another way of implementing AppendImageSearchPaths method?


Repository:
  rL LLVM

https://reviews.llvm.org/D47302



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


[Lldb-commits] [PATCH] D46726: build: use cmake to find the libedit content

2018-06-03 Thread Laurent Nicolas via Phabricator via lldb-commits
lonico77 added inline comments.



Comment at: scripts/Python/modules/readline/CMakeLists.txt:11
+   PRIVATE
+ ${libedit_INCLUDE_DIRS})
 if (NOT LLDB_DISABLE_LIBEDIT)

Should this be under  if (NOT LLDB_DISABLE_LIBEDIT)  ?

I'm seeing 
CMake Error: The following variables are used in this project, but they are set 
to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake 
files:
/x/eng/rtpbld01/scratch/laurentn/llvm-wss/sources/llvm_import_from_git_rtp3/llvm/tools/lldb/scripts/Python/modules/readline/libedit_INCLUDE_DIRS

used as include directory in directory 
/x/eng/rtpbld01/scratch/laurentn/llvm-wss/sources/llvm_import_from_git_rtp3/llvm/tools/lldb/scripts/Python/modules/readline



https://reviews.llvm.org/D46726



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


[Lldb-commits] [PATCH] D46726: build: use cmake to find the libedit content

2018-06-03 Thread Saleem Abdulrasool via Phabricator via lldb-commits
compnerd added inline comments.



Comment at: scripts/Python/modules/readline/CMakeLists.txt:11
+   PRIVATE
+ ${libedit_INCLUDE_DIRS})
 if (NOT LLDB_DISABLE_LIBEDIT)

lonico77 wrote:
> Should this be under  if (NOT LLDB_DISABLE_LIBEDIT)  ?
> 
> I'm seeing 
> CMake Error: The following variables are used in this project, but they are 
> set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the CMake 
> files:
> /x/eng/rtpbld01/scratch/laurentn/llvm-wss/sources/llvm_import_from_git_rtp3/llvm/tools/lldb/scripts/Python/modules/readline/libedit_INCLUDE_DIRS
> 
> used as include directory in directory 
> /x/eng/rtpbld01/scratch/laurentn/llvm-wss/sources/llvm_import_from_git_rtp3/llvm/tools/lldb/scripts/Python/modules/readline
> 
Yeah, it should be under the condition.  I'll patch that soon.


https://reviews.llvm.org/D46726



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


[Lldb-commits] [lldb] r333863 - Python: adjust the include directories

2018-06-03 Thread Saleem Abdulrasool via lldb-commits
Author: compnerd
Date: Sun Jun  3 19:08:12 2018
New Revision: 333863

URL: http://llvm.org/viewvc/llvm-project?rev=333863&view=rev
Log:
Python: adjust the include directories

Restructure the include search order to adjust for libedit.  This
ensures that the variables are not unused if they are not defined.

Modified:
lldb/trunk/scripts/Python/modules/readline/CMakeLists.txt

Modified: lldb/trunk/scripts/Python/modules/readline/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/modules/readline/CMakeLists.txt?rev=333863&r1=333862&r2=333863&view=diff
==
--- lldb/trunk/scripts/Python/modules/readline/CMakeLists.txt (original)
+++ lldb/trunk/scripts/Python/modules/readline/CMakeLists.txt Sun Jun  3 
19:08:12 2018
@@ -6,14 +6,13 @@ SET(PYTHON_DIRECTORY python${PYTHON_VERS
 # Build the readline python module
 include_directories(${PYTHON_INCLUDE_DIR})
 add_library(readline SHARED readline.cpp)
-target_include_directories(readline
-   PRIVATE
- ${libedit_INCLUDE_DIRS})
+target_link_libraries(readline ${PYTHON_LIBRARY})
 
 if (NOT LLDB_DISABLE_LIBEDIT)
-  target_link_libraries(readline ${PYTHON_LIBRARY} ${libedit_LIBRARIES})
-else()
-  target_link_libraries(readline ${PYTHON_LIBRARY})
+  target_include_directories(readline
+ PRIVATE
+   ${libedit_INCLUDE_DIRS})
+  target_link_libraries(readline ${libedit_LIBRARIES})
 endif()
 
 # FIXME: the LIBRARY_OUTPUT_PATH seems to be ignored - this is not a


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