From eb50b643fe00171823e055f7801e6610ee7bdef7 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 14 May 2020 15:55:21 +0200 Subject: [PATCH] [lldb/PDB] Make "native" pdb tests host-independent These test don't execute the binaries they build, and so they don't need to build for the host. By hardcoding the target, we don't have do xfail or skip them for targets which don't have the appropriate support in clang(-cl). --- lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp | 6 +++--- lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp | 6 +++--- lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp | 6 +++--- lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp | 6 +++--- lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp | 6 +++--- lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp | 6 +++--- .../Shell/SymbolFile/NativePDB/function-types-builtins.cpp | 6 +++--- .../Shell/SymbolFile/NativePDB/function-types-classes.cpp | 6 +++--- lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp | 7 ++++--- lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp | 6 +++--- .../Shell/SymbolFile/NativePDB/globals-fundamental.cpp | 7 ++++--- lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp | 7 ++++--- lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp | 6 +++--- lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp | 6 +++--- 14 files changed, 45 insertions(+), 42 deletions(-) diff --git a/lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp b/lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp index 1fee27503d2a0..7eb7a2cbe7d9a 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp @@ -1,8 +1,8 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/ast-functions.lldbinit 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp b/lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp index f8187598be355..fb1c8e116af41 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp @@ -1,8 +1,8 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -GR- -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/ast-methods.lldbinit 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp b/lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp index bf6cd6372d8ab..f3afa5d300991 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp @@ -1,9 +1,9 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 // Test various interesting cases for AST reconstruction. -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/ast-types.lldbinit 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp b/lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp index b56fdbaf5511a..bfa3cbc819472 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp @@ -1,9 +1,9 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 // Test various interesting cases for AST reconstruction. -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/bitfields.lldbinit 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp b/lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp index 8d3ab2ad3ab4a..1768f127c9fa4 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp @@ -1,9 +1,9 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 // Test that we can set simple breakpoints using PDB on any platform. -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/break-by-function.lldbinit | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp b/lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp index f68b421147ed1..ebb7114b985e6 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp @@ -1,9 +1,9 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 // Test that we can set simple breakpoints using PDB on any platform. -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/break-by-line.lldbinit | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp b/lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp index fb3ffdcb46c30..030ae95bf1ea1 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp @@ -1,8 +1,8 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/function-types-builtins.lldbinit | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp b/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp index de80dbbbbbd59..ca2a84de7698a 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp @@ -1,9 +1,9 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 // Test that we can display function signatures with class types. -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/function-types-classes.lldbinit | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp b/lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp index f3366fc792e68..226c47ce1c53f 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp @@ -1,9 +1,10 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 // Test that we can display tag types. -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 \ +// RUN: -Xclang -fkeep-static-consts -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/globals-classes.lldbinit | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp b/lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp index b8e54ec10de76..3744a2837055d 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp @@ -1,9 +1,9 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 // Make sure we can read variables from BSS -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: llvm-readobj -s %t.exe | FileCheck --check-prefix=BSS %s // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/globals-bss.lldbinit 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp b/lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp index a0260b69ebe25..2787e65928319 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp @@ -1,9 +1,10 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 // Test that we can display tag types. -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 \ +// RUN: -Xclang -fkeep-static-consts -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/globals-fundamental.lldbinit | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp b/lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp index eff74d14021e3..b188b9f6806fc 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp @@ -1,9 +1,10 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 // Test various interesting cases for AST reconstruction. -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 \ +// RUN: -Xclang -fkeep-static-consts -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/nested-types.lldbinit 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp b/lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp index dc8f18706925d..fb749c145aca9 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp @@ -1,9 +1,9 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 // Test that we can set display source of functions. -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/source-list.lldbinit | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp b/lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp index 1d8149b613f8b..df00f15c1a036 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp @@ -1,9 +1,9 @@ -// XFAIL: target-arm && linux-gnu // clang-format off -// REQUIRES: lld +// REQUIRES: lld, x86 // Test that we can display tag types. -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %clang_cl --target=x86_64-windows-msvc -GS- -Od -Z7 -c /Fo%t.obj -- %s +// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/tag-types.lldbinit | FileCheck %s