================
@@ -0,0 +1,23 @@
+// RUN: %clangxx --target=x86_64-pc-linux -o %t -c %s -g
----------------
labath wrote:

> This would only crash with -flimit-debug-info right?
Correct. The type definition needs to be absent from the binary and the ~only 
way to achieve that is to compile at least a part of it with 
-flimit-debug-info. I will add that explicitly.

> Not sure what the intent behind the x86 directory is but it would be nice to 
> get the coverage when running this on ARM machines too

The x86 directory is conditionalized on the x86 target, so it will run whenever 
the local build supports the x86 architecture (ie `X86` is in 
`LLVM_TARGETS_TO_BUILD`), regardless of the actual host architecture. (i.e., it 
works the same as as `x86` directories in llvm)

The goal here isn't so much to hardcode the architecture (to x86), as much it 
is to hardcode the file format (to non-windows). We don't support working with 
unlinked object files on windows, and if I tried to link things then I'd need 
to depend on the linker and pull in other platform-specific stuff, which would 
make the test non-minimal.

The thing I like about a test like this is that it (again, like the llvm tests) 
runs the same way everywhere, so there's little risk of needing to scrable to 
find a freebsd-mips (I'm exaggerating, I know) machine to reproduce a problem 
somewhere. (And I would totally love if we had more tests hardcoding 
aarch64-macosx triples so I can get more macos coverage without switching to a 
mac machine)

https://github.com/llvm/llvm-project/pull/102116
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to