[Lldb-commits] [lldb] eb50b64 - [lldb/PDB] Make "native" pdb tests host-independent
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu May 14 07:01:32 PDT 2020
Author: Pavel Labath
Date: 2020-05-14T16:01:23+02:00
New Revision: eb50b643fe00171823e055f7801e6610ee7bdef7
URL: https://github.com/llvm/llvm-project/commit/eb50b643fe00171823e055f7801e6610ee7bdef7
DIFF: https://github.com/llvm/llvm-project/commit/eb50b643fe00171823e055f7801e6610ee7bdef7.diff
LOG: [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).
Added:
Modified:
lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp
lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp
lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp
lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp
lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp
lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp
lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp
lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp
lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp
lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp
lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp
lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp
lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp
lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp
Removed:
################################################################################
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp b/lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp
index 1fee27503d2a..7eb7a2cbe7d9 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 f8187598be35..fb1c8e116af4 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 bf6cd6372d8a..f3afa5d30099 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 b56fdbaf5511..bfa3cbc81947 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 8d3ab2ad3ab4..1768f127c9fa 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 f68b421147ed..ebb7114b985e 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 fb3ffdcb46c3..030ae95bf1ea 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 de80dbbbbbd5..ca2a84de7698 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 f3366fc792e6..226c47ce1c53 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 b8e54ec10de7..3744a2837055 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 a0260b69ebe2..2787e6592831 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 eff74d14021e..b188b9f6806f 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 dc8f18706925..fb749c145aca 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 1d8149b613f8..df00f15c1a03 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
More information about the lldb-commits
mailing list