[Lldb-commits] [lldb] 4b63ca1 - [Mips] Use appropriate private label prefix based on Mips ABI

2019-10-23 Thread Mirko Brkusanin via lldb-commits

Author: Mirko Brkusanin
Date: 2019-10-23T12:24:35+02:00
New Revision: 4b63ca1379a8a6399c3d29560623ee832c818919

URL: 
https://github.com/llvm/llvm-project/commit/4b63ca1379a8a6399c3d29560623ee832c818919
DIFF: 
https://github.com/llvm/llvm-project/commit/4b63ca1379a8a6399c3d29560623ee832c818919.diff

LOG: [Mips] Use appropriate private label prefix based on Mips ABI

MipsMCAsmInfo was using '$' prefix for Mips32 and '.L' for Mips64
regardless of -target-abi option. By passing MCTargetOptions to MCAsmInfo
we can find out Mips ABI and pick appropriate prefix.

Tags: #llvm, #clang, #lldb

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

Added: 
llvm/test/MC/Mips/private-prefix.s

Modified: 
clang/lib/Parse/ParseStmtAsm.cpp
clang/tools/driver/cc1as_main.cpp
lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
llvm/include/llvm/Support/TargetRegistry.h
llvm/lib/CodeGen/LLVMTargetMachine.cpp
llvm/lib/MC/MCDisassembler/Disassembler.cpp
llvm/lib/Object/ModuleSymbolTable.cpp
llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.h
llvm/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.cpp
llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
llvm/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp
llvm/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.h
llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h
llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCAsmInfo.cpp
llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCAsmInfo.h
llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h
llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h
llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp
llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h
llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h
llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
llvm/test/CodeGen/Mips/compactbranches/no-beqzc-bnezc.ll
llvm/test/MC/Mips/macro-li.d.s
llvm/test/MC/Mips/macro-li.s.s
llvm/tools/dsymutil/DwarfStreamer.cpp
llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp
llvm/tools/llvm-dwp/llvm-dwp.cpp
llvm/tools/llvm-exegesis/lib/Analysis.cpp
llvm/tools/llvm-jitlink/llvm-jitlink.cpp
llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
llvm/tools/llvm-mc/Disassembler.cpp
llvm/tools/llvm-mc/Disassembler.h
llvm/tools/llvm-mc/llvm-mc.cpp
llvm/tools/llvm-mca/llvm-mca.cpp
llvm/tools/llvm-objdump/MachODump.cpp
llvm/tools/llvm-objdump/llvm-objdump.cpp
llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
llvm/tools/sancov/sancov.cpp
llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
llvm/unittests/ExecutionEngine/JITLink/JITLinkTestCommon.cpp
llvm/unittests/MC/DwarfLineTables.cpp
llvm/unittests/MC/MCInstPrinter.cpp

Removed: 




diff  --git a/clang/lib/Parse/ParseStmtAsm.cpp 
b/clang/lib/Parse/ParseStmtAsm.cpp
index 1153c2510b05..6b301667d3f2 100644
--- a/clang/lib/Parse/ParseStmtAsm.cpp
+++ b/clang/lib/Parse/ParseStmtAsm.cpp
@@ -582,7 +582,10 @@ StmtResult 
Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) {
   llvm::join(TO.Features.begin(), TO.Features.end(), ",");
 
   std::unique_ptr MRI(TheTarget->createMCRegInfo(TT));
-  std::unique_ptr MAI(TheTarget->createMCAsmInfo(*MRI, TT));
+  // FIXME: init MCOptions from sanitizer flags here.
+  llvm::MCTargetOptions MCOptions;
+  std::unique_ptr MAI(
+  TheTarget->createMCAsmInfo(*MRI, TT, MCOptions));
   // Get the instruction descriptor.
   std::unique_ptr MII(TheTarget->createMCInstrInfo());
   std::unique_ptr MOFI(new llvm::MCObjectFileInfo());
@@ -602,8 +605,6 @@ StmtResult 
Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) {
   std::unique_ptr Parser(
   createMCAsmParser(TempSrcMgr, Ctx, *Str.get(), *MAI));
 
-  // FIXME: init MCOptions from sanitizer flags here.
-  llvm::MCTargetOptions MCOptions;
   std::unique_ptr TargetParser(
   TheTarget->createMCAsmParser(*STI, *Parser, *MII, MCOptions));
 

diff  --

[Lldb-commits] [PATCH] D69148: Disable exit-on-SIGPIPE in lldb

2019-10-23 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments.



Comment at: lldb/tools/driver/Driver.cpp:850
 #if !defined(_MSC_VER)
   signal(SIGPIPE, SIG_IGN);
   signal(SIGWINCH, sigwinch_handler);

vsk wrote:
> labath wrote:
> > vsk wrote:
> > > labath wrote:
> > > > I don't think this line does anything anymore.
> > > I don't think that's true. LLVM still does `registerHandler(SIGPIPE, 
> > > SignalKind::IsKill)` in `RegisterHandlers`. At least, removing the 
> > > `signal(SIGPIPE, SIG_IGN)` calls causes the unit test to "fail" (i.e. the 
> > > test RUNs but doesn't reach OK).
> > Ah, right, I see now. This does have a very subtle change in behavior -- it 
> > changes the signal handler that llvm restores *after* the signal has been 
> > received the first time (Signals.inc:355). Normally, it would put SIG_DFL 
> > there (which would kill the process). But with this, it puts SIG_IGN there. 
> > So this changes what we do when we receive SIGPIPE for the *second* time.
> > 
> > This means that the first SIGPIPE signal is ignored by the virtue of us 
> > calling `SetPipeSignalFunction(nullptr)`, but all subsequent SIGPIPEs are 
> > ignored thanks to this SIG_IGN. It also means this whole talk of "being 
> > able to survive multiple SIGPIPEs" is moot, as llvm does not allow that. In 
> > fact it looks like the very first occurence of SIGPIPE will cause _all_ 
> > signal handlers to be uninstalled. I think this is a very confusing 
> > situation to be in.
> > 
> > If we don't want to make llvm support handling/ignoring multiple SIGPIPEs 
> > correctly, then I think that a much better solution would be to just work 
> > around this in lldb by making sure the llvm handler is never invoked for 
> > SIGPIPE (this can be arranged by making sure `signal(SIGPIPE, SIG_IGN)` is 
> > called *after* llvm installs its handlers.
> Point taken. I agree that when a SIGPIPE is received, it doesn't make sense 
> to reset the signal handler state as it was prior to llvm's handler 
> registration. Do you think it'd be reasonable to:
> 
> - In lldb, force llvm to register its handlers, then immediately ignore 
> SIGPIPE.
> - Revert the `SetPipeSignalFunction` changes, as they would no longer be 
> required.
As far as workarounds go, I think that's the best we can do know (+ add a big 
comment explaining what we're doing there).

I think that overall the llvm signal handling needs a lot more work, but as 
that would probably require buy-in from various actors, I don't think that it 
should be you who has to fix all that.

FTR, I find the current signal handling very strange, and completely unsuitable 
for something which claims to be a library. I don't believe a library should 
install any signal handler unless it's explicitly asked to, or, at the very 
least, it should provide a mechanism to opt out of this.
I would make this handler installation a part of InitLLVM, or something 
similar, and make it possible to customize its behavior a lot more. The current 
implementation is very clearly tailored for one-shot non-interactive tools that 
immediately exit when encountering a problem. Besides SIGPIPE (which even the 
non-interactive tools might want to ignore), it's handling of SIGINT is also 
definitely not what lldb wants to do (forward it to the debugged process). 
There are even some JIT tools that might want to catch & recover from SIGSEGVs, 
but this implementation makes that very hard to do because of the whole race 
about who installs the signal handlers last.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69148



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision.
labath added reviewers: stella.stamenova, jankratochvil, gkistanova.

The changes appear to be straight-forward, but I don't know how to test them
without committing to zorg.


https://reviews.llvm.org/D69341

Files:
  zorg/buildbot/builders/LLDBBuilder.py


Index: zorg/buildbot/builders/LLDBBuilder.py
===
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -74,7 +74,7 @@
 command=getVisualStudioEnvironment(vs, target_arch),
 extract_fn=extractSlaveEnvironment))
 
-f = getLLDBSource(f,'llvm')
+f.addGetSourcecodeSteps()
 
 build_cmd=['ninja']
 install_cmd = ['ninja','install']
@@ -105,7 +105,7 @@
 ))
 
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", "../" + self.monorepo_dir,
 "-DCMAKE_BUILD_TYPE=" + config,
 "-DCMAKE_INSTALL_PREFIX=../install"
 ]


Index: zorg/buildbot/builders/LLDBBuilder.py
===
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -74,7 +74,7 @@
 command=getVisualStudioEnvironment(vs, target_arch),
 extract_fn=extractSlaveEnvironment))
 
-f = getLLDBSource(f,'llvm')
+f.addGetSourcecodeSteps()
 
 build_cmd=['ninja']
 install_cmd = ['ninja','install']
@@ -105,7 +105,7 @@
 ))
 
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", "../" + self.monorepo_dir,
 "-DCMAKE_BUILD_TYPE=" + config,
 "-DCMAKE_INSTALL_PREFIX=../install"
 ]
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment.

FYI my local buildbot master errors out this way:

  2019-10-23 16:10:12+0200 [-] error while parsing config file
  2019-10-23 16:10:12+0200 [-] Unhandled Error
Traceback (most recent call last):
  File 
"/home/buildbot/.local/lib/python2.7/site-packages/buildbot-latest-py2.7.egg/buildbot/master.py",
 line 197, in loadTheConfigFile
d = self.loadConfig(f)
  File 
"/home/buildbot/.local/lib/python2.7/site-packages/buildbot-latest-py2.7.egg/buildbot/master.py",
 line 579, in loadConfig
d.addCallback(do_load)
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", 
line 322, in addCallback
callbackKeywords=kw)
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", 
line 311, in addCallbacks
self._runCallbacks()
---  ---
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", 
line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
  File 
"/home/buildbot/.local/lib/python2.7/site-packages/buildbot-latest-py2.7.egg/buildbot/master.py",
 line 226, in do_load
exec f in localDict
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/master.cfg", line 83, in 

c['builders'] = builders = list(config.builders.get_builders())
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/config/builders.py", line 
1444, in get_builders
for b in _get_lldb_builders():
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/config/builders.py", line 
817, in _get_lldb_builders
'-DLLVM_LIT_ARGS="-v"'])},
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/zorg/buildbot/builders/LLDBBuilder.py",
 line 77, in getLLDBCMakeBuildFactory
f.addGetSourcecodeSteps()
exceptions.AttributeError: BuildFactory instance has no attribute 
'addGetSourcecodeSteps'

  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/master.cfg", line 83, in 

c['builders'] = builders = list(config.builders.get_builders())
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/config/builders.py", line 
1444, in get_builders
for b in _get_lldb_builders():
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/config/builders.py", line 
817, in _get_lldb_builders
'-DLLVM_LIT_ARGS="-v"'])},
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/zorg/buildbot/builders/LLDBBuilder.py",
 line 77, in getLLDBCMakeBuildFactory
f.addGetSourcecodeSteps()
exceptions.AttributeError: BuildFactory instance has no attribute 
'addGetSourcecodeSteps'


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69209: [lldb] Add test for running static initializers in expressions.

2019-10-23 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor abandoned this revision.
teemperor added a comment.

Landed in r375422


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D69209



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


[Lldb-commits] [lldb] d01fd2f - [lldb] Add nodebug attribute to import-std-module/sysroot test

2019-10-23 Thread Raphael Isemann via lldb-commits

Author: Raphael Isemann
Date: 2019-10-23T09:26:57-07:00
New Revision: d01fd2f35a02cb53a5d9d1a5342b5085c5dce66c

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

LOG: [lldb] Add nodebug attribute to import-std-module/sysroot test

Summary:
So far we rely on the default argument and the fact that we don't call this
inline function in our actual `main.cpp` to make sure that this function can 
only
be called if LLDB loads this header as a C++ module. This patch just adds
the nodebug attribute as yet another measure to make sure LLDB can't call this
function without the standard module loaded. Note that the test is already
requiring clang for the sysroot setup, so its fine that this is a Clang 
specific attribute.

Reviewers: friss, labath

Subscribers: JDevlieghere, lldb-commits

Tags: #lldb

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

Added: 


Modified: 

lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm

Removed: 




diff  --git 
a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
 
b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
index 43f7becdbeb6..a0cb2f15a193 100644
--- 
a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
+++ 
b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
@@ -4,6 +4,7 @@ namespace std {
   // Makes sure we get a support file for this header.
   struct vector { int i; };
 
+  __attribute__((__nodebug__))
   inline int myabs(int i = -123) {
 double nil;
 return i < 0 ? -i : i;



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


[Lldb-commits] [PATCH] D68861: [lldb] Add nodebug attribute to import-std-module/sysroot test

2019-10-23 Thread Raphael Isemann via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd01fd2f35a02: [lldb] Add nodebug attribute to 
import-std-module/sysroot test (authored by teemperor).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68861

Files:
  
lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm


Index: 
lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
===
--- 
lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
+++ 
lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
@@ -4,6 +4,7 @@
   // Makes sure we get a support file for this header.
   struct vector { int i; };
 
+  __attribute__((__nodebug__))
   inline int myabs(int i = -123) {
 double nil;
 return i < 0 ? -i : i;


Index: lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
===
--- lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
+++ lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
@@ -4,6 +4,7 @@
   // Makes sure we get a support file for this header.
   struct vector { int i; };
 
+  __attribute__((__nodebug__))
   inline int myabs(int i = -123) {
 double nil;
 return i < 0 ? -i : i;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 226154.
labath added a comment.

Create the appropriate build factory


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

https://reviews.llvm.org/D69341

Files:
  zorg/buildbot/builders/LLDBBuilder.py


Index: zorg/buildbot/builders/LLDBBuilder.py
===
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -66,7 +66,9 @@
 install=False):
 
 # PREPARING
-f = buildbot.process.factory.BuildFactory()
+f = LLVMBuildFactory(
+is_legacy_mode=False,
+depends_on_projects=["llvm", "clang", "lldb", "lld"])
 
 # Determine Slave Environment and Set MSVC environment.
 if vs:
@@ -74,7 +76,7 @@
 command=getVisualStudioEnvironment(vs, target_arch),
 extract_fn=extractSlaveEnvironment))
 
-f = getLLDBSource(f,'llvm')
+f.addGetSourcecodeSteps()
 
 build_cmd=['ninja']
 install_cmd = ['ninja','install']
@@ -105,7 +107,7 @@
 ))
 
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", "../" + self.monorepo_dir,
 "-DCMAKE_BUILD_TYPE=" + config,
 "-DCMAKE_INSTALL_PREFIX=../install"
 ]


Index: zorg/buildbot/builders/LLDBBuilder.py
===
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -66,7 +66,9 @@
 install=False):
 
 # PREPARING
-f = buildbot.process.factory.BuildFactory()
+f = LLVMBuildFactory(
+is_legacy_mode=False,
+depends_on_projects=["llvm", "clang", "lldb", "lld"])
 
 # Determine Slave Environment and Set MSVC environment.
 if vs:
@@ -74,7 +76,7 @@
 command=getVisualStudioEnvironment(vs, target_arch),
 extract_fn=extractSlaveEnvironment))
 
-f = getLLDBSource(f,'llvm')
+f.addGetSourcecodeSteps()
 
 build_cmd=['ninja']
 install_cmd = ['ninja','install']
@@ -105,7 +107,7 @@
 ))
 
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", "../" + self.monorepo_dir,
 "-DCMAKE_BUILD_TYPE=" + config,
 "-DCMAKE_INSTALL_PREFIX=../install"
 ]
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

Thanks for trying it out. The last update should fix that error. Could I 
trouble you to give it another spin?


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment.

  2019-10-23 20:34:53+0200 [-] error while parsing config file
  2019-10-23 20:34:53+0200 [-] Unhandled Error
Traceback (most recent call last):
  File 
"/home/buildbot/.local/lib/python2.7/site-packages/buildbot-latest-py2.7.egg/buildbot/master.py",
 line 197, in loadTheConfigFile
d = self.loadConfig(f)
  File 
"/home/buildbot/.local/lib/python2.7/site-packages/buildbot-latest-py2.7.egg/buildbot/master.py",
 line 579, in loadConfig
d.addCallback(do_load)
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", 
line 322, in addCallback
callbackKeywords=kw)
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", 
line 311, in addCallbacks
self._runCallbacks()
---  ---
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", 
line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
  File 
"/home/buildbot/.local/lib/python2.7/site-packages/buildbot-latest-py2.7.egg/buildbot/master.py",
 line 226, in do_load
exec f in localDict
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/master.cfg", line 83, in 

c['builders'] = builders = list(config.builders.get_builders())
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/config/builders.py", line 
1444, in get_builders
for b in _get_lldb_builders():
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/config/builders.py", line 
817, in _get_lldb_builders
'-DLLVM_LIT_ARGS="-v"'])},
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/zorg/buildbot/builders/LLDBBuilder.py",
 line 110, in getLLDBCMakeBuildFactory
"cmake", "-G", "Ninja", "../" + self.monorepo_dir,
exceptions.NameError: global name 'self' is not defined


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment.

I could pack some patched `buildbot-0.8.5` and patched `zorg-git` running on 
Fedora 30 (and its Python version) so that you can run it yourself. But I am 
also fine to just testing it.


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Siva Chandra via Phabricator via lldb-commits
sivachandra added inline comments.



Comment at: zorg/buildbot/builders/LLDBBuilder.py:110
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", "../" + self.monorepo_dir,
 "-DCMAKE_BUILD_TYPE=" + config,

Should this be os.path.join(os.pardir, f.monorepo_dir, "llvm") ?


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment.

After the @sivachandra 's fix I get:

  2019-10-23 21:28:24+0200 [-] LLVMGitPoller: using workdir 
'/quad/home/buildbot/zorg-git/buildbot/osuosl/master/gitpoller-workdir'
  2019-10-23 21:28:24+0200 [-] LLVMGitPoller: initializing working dir from 
http://git.lab.llvm.org/llvm/llvm-project.git
  2019-10-23 21:28:24+0200 [-] configuration update complete
  2019-10-23 21:28:25+0200 [-] while initializing LLVMGitPoller repository
Traceback (most recent call last):
  File 
"/usr/lib64/python2.7/site-packages/twisted/internet/_baseprocess.py", line 64, 
in maybeCallProcessEnded
proto.processEnded(Failure(reason))
  File "/usr/lib64/python2.7/site-packages/twisted/internet/utils.py", 
line 163, in processEnded
self.deferred.callback((out, err, code))
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", 
line 460, in callback
self._startRunCallbacks(result)
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", 
line 568, in _startRunCallbacks
self._runCallbacks()
---  ---
  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", 
line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
  File 
"/quad/home/buildbot/zorg-git/buildbot/osuosl/master/zorg/buildbot/changes/llvmgitpoller.py",
 line 419, in _convert_nonzero_to_failure
raise EnvironmentError('command failed with exit code %d: %s' % 
(code, stderr))
exceptions.EnvironmentError: command failed with exit code 128: fatal: 
unable to access 'http://git.lab.llvm.org/llvm/llvm-project.git/': Could not 
resolve host: git.lab.llvm.org




Comment at: zorg/buildbot/builders/LLDBBuilder.py:110
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", "../" + self.monorepo_dir,
 "-DCMAKE_BUILD_TYPE=" + config,

sivachandra wrote:
> Should this be os.path.join(os.pardir, f.monorepo_dir, "llvm") ?
I was curious there is no longer trailing `"llvm"` as I am using `cmake 
../llvm-monorepo/llvm/`.  Yes, it does compile with the new expression there:
```
"cmake", "-G", "Ninja", os.path.join(os.pardir, f.monorepo_dir, "llvm"),
```


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment.

I was using these 3 patches for buildbot-0.8.5 (and one for zorg) to get the 
master running.  But sure there is still some configuration afterwards:
https://people.redhat.com/jkratoch/buildbot-0.8.5-fix.patch
https://people.redhat.com/jkratoch/buildbot-0.8.5-fix2.patch
https://people.redhat.com/jkratoch/buildbot-0.8.5-fix3.patch
https://people.redhat.com/jkratoch/zorg-dummy.patch


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Siva Chandra via Phabricator via lldb-commits
sivachandra added inline comments.



Comment at: zorg/buildbot/builders/LLDBBuilder.py:71
+is_legacy_mode=False,
+depends_on_projects=["llvm", "clang", "lldb", "lld"])
 

I wonder why it is getting git.lab.llvm.org! Can you try with an additional arg 
to the LLVMBuildFactory constructor:

```
  repourl_prefix="http://github.com/llvm/";
```


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Siva Chandra via Phabricator via lldb-commits
sivachandra added inline comments.



Comment at: zorg/buildbot/builders/LLDBBuilder.py:71
+is_legacy_mode=False,
+depends_on_projects=["llvm", "clang", "lldb", "lld"])
 

sivachandra wrote:
> I wonder why it is getting git.lab.llvm.org! Can you try with an additional 
> arg to the LLVMBuildFactory constructor:
> 
> ```
>   repourl_prefix="http://github.com/llvm/";
> ```
May be https instead of http.


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

In D69341#1719159 , @jankratochvil 
wrote:

> I was using these 3 patches for buildbot-0.8.5 (and one for zorg) to get the 
> master running.  But sure there is still some configuration afterwards:
>  https://people.redhat.com/jkratoch/buildbot-0.8.5-fix.patch
>  https://people.redhat.com/jkratoch/buildbot-0.8.5-fix2.patch
>  https://people.redhat.com/jkratoch/buildbot-0.8.5-fix3.patch
>  https://people.redhat.com/jkratoch/zorg-dummy.patch


Thanks. This may come in useful, though I hope I don't have to go back in here 
for a long time. :)


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Pavel Labath via Phabricator via lldb-commits
labath marked 2 inline comments as done.
labath added inline comments.



Comment at: zorg/buildbot/builders/LLDBBuilder.py:71
+is_legacy_mode=False,
+depends_on_projects=["llvm", "clang", "lldb", "lld"])
 

sivachandra wrote:
> sivachandra wrote:
> > I wonder why it is getting git.lab.llvm.org! Can you try with an additional 
> > arg to the LLVMBuildFactory constructor:
> > 
> > ```
> >   repourl_prefix="http://github.com/llvm/";
> > ```
> May be https instead of http.
Are you sure that's needed? I don't see anyone else setting that. 
@jankratochvil, could this be something specific to your setup?



Comment at: zorg/buildbot/builders/LLDBBuilder.py:110
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", "../" + self.monorepo_dir,
 "-DCMAKE_BUILD_TYPE=" + config,

jankratochvil wrote:
> sivachandra wrote:
> > Should this be os.path.join(os.pardir, f.monorepo_dir, "llvm") ?
> I was curious there is no longer trailing `"llvm"` as I am using `cmake 
> ../llvm-monorepo/llvm/`.  Yes, it does compile with the new expression there:
> ```
> "cmake", "-G", "Ninja", os.path.join(os.pardir, f.monorepo_dir, 
> "llvm"),
> ```
Technically, using `os.path.join`, is not correct here, because this is a path 
on the buildbot, not the path on the host which runs the master. In practice 
that doesn't matter because the master runs on a posix system. The existing 
code is pretty inconsistent about the usage, but the `../` seems to be a bit 
more common.


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 226183.
labath added a comment.

s/self.monorepo_dir/f.monorepo_dir


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

https://reviews.llvm.org/D69341

Files:
  zorg/buildbot/builders/LLDBBuilder.py


Index: zorg/buildbot/builders/LLDBBuilder.py
===
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -66,7 +66,9 @@
 install=False):
 
 # PREPARING
-f = buildbot.process.factory.BuildFactory()
+f = LLVMBuildFactory(
+is_legacy_mode=False,
+depends_on_projects=["llvm", "clang", "lldb", "lld"])
 
 # Determine Slave Environment and Set MSVC environment.
 if vs:
@@ -74,7 +76,7 @@
 command=getVisualStudioEnvironment(vs, target_arch),
 extract_fn=extractSlaveEnvironment))
 
-f = getLLDBSource(f,'llvm')
+f.addGetSourcecodeSteps()
 
 build_cmd=['ninja']
 install_cmd = ['ninja','install']
@@ -105,7 +107,7 @@
 ))
 
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", "../" + f.monorepo_dir,
 "-DCMAKE_BUILD_TYPE=" + config,
 "-DCMAKE_INSTALL_PREFIX=../install"
 ]


Index: zorg/buildbot/builders/LLDBBuilder.py
===
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -66,7 +66,9 @@
 install=False):
 
 # PREPARING
-f = buildbot.process.factory.BuildFactory()
+f = LLVMBuildFactory(
+is_legacy_mode=False,
+depends_on_projects=["llvm", "clang", "lldb", "lld"])
 
 # Determine Slave Environment and Set MSVC environment.
 if vs:
@@ -74,7 +76,7 @@
 command=getVisualStudioEnvironment(vs, target_arch),
 extract_fn=extractSlaveEnvironment))
 
-f = getLLDBSource(f,'llvm')
+f.addGetSourcecodeSteps()
 
 build_cmd=['ninja']
 install_cmd = ['ninja','install']
@@ -105,7 +107,7 @@
 ))
 
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", "../" + f.monorepo_dir,
 "-DCMAKE_BUILD_TYPE=" + config,
 "-DCMAKE_INSTALL_PREFIX=../install"
 ]
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Siva Chandra via Phabricator via lldb-commits
sivachandra added inline comments.



Comment at: zorg/buildbot/builders/LLDBBuilder.py:71
+is_legacy_mode=False,
+depends_on_projects=["llvm", "clang", "lldb", "lld"])
 

labath wrote:
> sivachandra wrote:
> > sivachandra wrote:
> > > I wonder why it is getting git.lab.llvm.org! Can you try with an 
> > > additional arg to the LLVMBuildFactory constructor:
> > > 
> > > ```
> > >   repourl_prefix="http://github.com/llvm/";
> > > ```
> > May be https instead of http.
> Are you sure that's needed? I don't see anyone else setting that. 
> @jankratochvil, could this be something specific to your setup?
If I am reading the code right, it should not be needed. I suggested that to 
see if @jankratochvil can make progress, which validates the rest of this patch.



Comment at: zorg/buildbot/builders/LLDBBuilder.py:110
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", "../" + self.monorepo_dir,
 "-DCMAKE_BUILD_TYPE=" + config,

labath wrote:
> jankratochvil wrote:
> > sivachandra wrote:
> > > Should this be os.path.join(os.pardir, f.monorepo_dir, "llvm") ?
> > I was curious there is no longer trailing `"llvm"` as I am using `cmake 
> > ../llvm-monorepo/llvm/`.  Yes, it does compile with the new expression 
> > there:
> > ```
> > "cmake", "-G", "Ninja", os.path.join(os.pardir, f.monorepo_dir, 
> > "llvm"),
> > ```
> Technically, using `os.path.join`, is not correct here, because this is a 
> path on the buildbot, not the path on the host which runs the master. In 
> practice that doesn't matter because the master runs on a posix system. The 
> existing code is pretty inconsistent about the usage, but the `../` seems to 
> be a bit more common.
Right. The main point I was trying to convey was to add the path to the llvm 
directory.

I am only interested in seeing what you eventually land as I want to use the 
same for the LLVM libc builders.


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

https://reviews.llvm.org/D69341



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


[Lldb-commits] [PATCH] D69341: [zorg] Port LLDB cmake build factory to git

2019-10-23 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 226200.
labath added a comment.

add '/llvm' ...


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

https://reviews.llvm.org/D69341

Files:
  zorg/buildbot/builders/LLDBBuilder.py


Index: zorg/buildbot/builders/LLDBBuilder.py
===
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -66,7 +66,9 @@
 install=False):
 
 # PREPARING
-f = buildbot.process.factory.BuildFactory()
+f = LLVMBuildFactory(
+is_legacy_mode=False,
+depends_on_projects=["llvm", "clang", "lldb", "lld"])
 
 # Determine Slave Environment and Set MSVC environment.
 if vs:
@@ -74,7 +76,7 @@
 command=getVisualStudioEnvironment(vs, target_arch),
 extract_fn=extractSlaveEnvironment))
 
-f = getLLDBSource(f,'llvm')
+f.addGetSourcecodeSteps()
 
 build_cmd=['ninja']
 install_cmd = ['ninja','install']
@@ -105,7 +107,7 @@
 ))
 
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", os.path.join(os.pardir, f.monorepo_dir, 
"llvm"),
 "-DCMAKE_BUILD_TYPE=" + config,
 "-DCMAKE_INSTALL_PREFIX=../install"
 ]


Index: zorg/buildbot/builders/LLDBBuilder.py
===
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -66,7 +66,9 @@
 install=False):
 
 # PREPARING
-f = buildbot.process.factory.BuildFactory()
+f = LLVMBuildFactory(
+is_legacy_mode=False,
+depends_on_projects=["llvm", "clang", "lldb", "lld"])
 
 # Determine Slave Environment and Set MSVC environment.
 if vs:
@@ -74,7 +76,7 @@
 command=getVisualStudioEnvironment(vs, target_arch),
 extract_fn=extractSlaveEnvironment))
 
-f = getLLDBSource(f,'llvm')
+f.addGetSourcecodeSteps()
 
 build_cmd=['ninja']
 install_cmd = ['ninja','install']
@@ -105,7 +107,7 @@
 ))
 
 cmake_cmd = [
-"cmake", "-G", "Ninja", "../llvm",
+"cmake", "-G", "Ninja", os.path.join(os.pardir, f.monorepo_dir, "llvm"),
 "-DCMAKE_BUILD_TYPE=" + config,
 "-DCMAKE_INSTALL_PREFIX=../install"
 ]
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits