zturner added a comment.

In https://reviews.llvm.org/D53731#1276633, @jingham wrote:

> Well, what's really going on is that I'm not familiar enough with lit to know 
> that it doesn't have the ability to run different commands to produce the 
> input file...  But as you guessed, my point is that you have written a bunch 
> of tests that would be valuable to test against any symfile format, so it is 
> a shame to only run them against one format.  OTOH, if that's not possible 
> right now, I'm content to wait for some enhancements to lit that make it 
> possible.


I can maybe hardcode multiple runlines, one for each possible target triple.  
But what's really going on is that I'm not familiar enough with other platforms 
to know how to generate their binaries :)

But I'll actually give it a try.  Just to explain what's going on here, I've 
got these two lines:

  // RUN: clang-cl /Z7 /GS- /GR- /c /Fo%t.obj -- %s 
  // RUN: lld-link /DEBUG /nodefaultlib /entry:main /OUT:%t.exe /PDB:%t.pdb -- 
%t.obj

Those two run the compiler and linker and write the output to a temporary file, 
but don't actually check anything yet.  The next two lines (which are actually 
one command broken with a continuation character)

  // RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb -f %t.exe -s \
  // RUN:     %p/Inputs/globals-fundamental.lldbinit | FileCheck %s

runs lldb and pipes the result to FileCheck, using this file as the check file.

So what I could *try* doing is having multiple compiler / linker invocations.  
One that produces a Windows executable / PDB file.  One that produces a Linux 
executable / DWARF.  One that produces some kind of OSX binary (I think lld 
doesn't work with MachO yet, so I'm not sure about this one), writing the 
linker outputs to different files each time.

Then we could maybe run lldb 3 times, once against each input, but using the 
same check file each time.  I'll give it a try and see what happens.


https://reviews.llvm.org/D53731



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

Reply via email to