summaryrefslogtreecommitdiffstats
path: root/lldb/test/Shell/Unwind
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-10-30 15:57:16 +0100
committerPavel Labath <pavel@labath.sk>2019-10-31 10:40:37 +0100
commit9c739252261ea762d1bbbd8234d93c9038711fcd (patch)
tree67566285d8632debaecf25dbc79a24ff01555413 /lldb/test/Shell/Unwind
parenta7aee6c47a1b12dd7d579b4f98d7049eb1e987ce (diff)
downloadbcm5719-llvm-9c739252261ea762d1bbbd8234d93c9038711fcd.tar.gz
bcm5719-llvm-9c739252261ea762d1bbbd8234d93c9038711fcd.zip
[lldb/lit] Introduce %clang_host substitutions
Summary: This patch addresses an ambiguity in how our existing tests invoke the compiler. Roughly two thirds of our current "shell" tests invoke the compiler to build the executables for the host. However, there is also a significant number of tests which don't build a host binary (because they don't need to run it) and instead they hardcode a certain target. We also have code which adds a bunch of default arguments to the %clang substitutions. However, most of these arguments only really make sense for the host compilation. So far, this has worked mostly ok, because the arguments we were adding were not conflicting with the target-hardcoding tests (though they did provoke an occasional "argument unused" warning). However, this started to break down when we wanted to use target-hardcoding clang-cl tests (D69031) because clang-cl has a substantially different command line, and it was getting very confused by some of the arguments we were adding on non-windows hosts. This patch avoid this problem by creating separate %clang(xx,_cl)_host substutitions, which are specifically meant to be used for compiling host binaries. All funny host-specific options are moved there. To ensure that the regular %clang substitutions are not used for compiling host binaries (skipping the extra arguments) I employ a little hac^H^H^Htrick -- I add an invalid --target argument to the %clang substitution, which means that one has to use an explicit --target in order for the compilation to succeed. Reviewers: JDevlieghere, aprantl, mstorsjo, espindola Subscribers: emaste, arichardson, MaskRay, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69619
Diffstat (limited to 'lldb/test/Shell/Unwind')
-rw-r--r--lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test2
-rw-r--r--lldb/test/Shell/Unwind/eh-frame-small-fde.test2
-rw-r--r--lldb/test/Shell/Unwind/prefer-debug-over-eh-frame.test2
-rw-r--r--lldb/test/Shell/Unwind/trap_frame_sym_ctx.test2
-rw-r--r--lldb/test/Shell/Unwind/unwind-plan-dwarf-dump.test2
5 files changed, 5 insertions, 5 deletions
diff --git a/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test b/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test
index 4613b104b96..c0b6e5e50f8 100644
--- a/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test
+++ b/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test
@@ -4,7 +4,7 @@
# UNSUPPORTED: system-windows
# REQUIRES: target-x86_64, native
-# RUN: %clang %p/Inputs/call-asm.c %p/Inputs/eh-frame-dwarf-unwind.s -o %t
+# RUN: %clang_host %p/Inputs/call-asm.c %p/Inputs/eh-frame-dwarf-unwind.s -o %t
# RUN: %lldb %t -s %s -o exit | FileCheck %s
breakpoint set -n bar
diff --git a/lldb/test/Shell/Unwind/eh-frame-small-fde.test b/lldb/test/Shell/Unwind/eh-frame-small-fde.test
index 368917a063e..0ece6c2a12a 100644
--- a/lldb/test/Shell/Unwind/eh-frame-small-fde.test
+++ b/lldb/test/Shell/Unwind/eh-frame-small-fde.test
@@ -3,7 +3,7 @@
# REQUIRES: target-x86_64, system-linux, native
-# RUN: %clang %p/Inputs/eh-frame-small-fde.s -o %t
+# RUN: %clang_host %p/Inputs/eh-frame-small-fde.s -o %t
# RUN: %lldb %t -s %s -o exit | FileCheck %s
breakpoint set -n bar
diff --git a/lldb/test/Shell/Unwind/prefer-debug-over-eh-frame.test b/lldb/test/Shell/Unwind/prefer-debug-over-eh-frame.test
index f023a1e75fa..19e3ae18c25 100644
--- a/lldb/test/Shell/Unwind/prefer-debug-over-eh-frame.test
+++ b/lldb/test/Shell/Unwind/prefer-debug-over-eh-frame.test
@@ -8,7 +8,7 @@
# XFAIL: system-darwin
# REQUIRES: target-x86_64, native
-# RUN: %clang -g %p/Inputs/call-asm.c %p/Inputs/prefer-debug-over-eh-frame.s -o %t
+# RUN: %clang_host -g %p/Inputs/call-asm.c %p/Inputs/prefer-debug-over-eh-frame.s -o %t
# RUN: %lldb %t -s %s -o exit | FileCheck %s
breakpoint set -n bar
diff --git a/lldb/test/Shell/Unwind/trap_frame_sym_ctx.test b/lldb/test/Shell/Unwind/trap_frame_sym_ctx.test
index 10f7892e928..1bf1fb1d6e8 100644
--- a/lldb/test/Shell/Unwind/trap_frame_sym_ctx.test
+++ b/lldb/test/Shell/Unwind/trap_frame_sym_ctx.test
@@ -4,7 +4,7 @@
# UNSUPPORTED: system-windows
# REQUIRES: target-x86_64, native
-# RUN: %clang %p/Inputs/call-asm.c %p/Inputs/trap_frame_sym_ctx.s -o %t
+# RUN: %clang_host %p/Inputs/call-asm.c %p/Inputs/trap_frame_sym_ctx.s -o %t
# RUN: %lldb %t -s %s -o exit | FileCheck %s
settings append target.trap-handler-names tramp
diff --git a/lldb/test/Shell/Unwind/unwind-plan-dwarf-dump.test b/lldb/test/Shell/Unwind/unwind-plan-dwarf-dump.test
index c378f56b4f6..67b482b2df9 100644
--- a/lldb/test/Shell/Unwind/unwind-plan-dwarf-dump.test
+++ b/lldb/test/Shell/Unwind/unwind-plan-dwarf-dump.test
@@ -1,6 +1,6 @@
# REQUIRES: target-x86_64, system-linux, native
-# RUN: %clang %p/Inputs/unwind-plan-dwarf-dump.s -o %t
+# RUN: %clang_host %p/Inputs/unwind-plan-dwarf-dump.s -o %t
# RUN: %lldb %t -s %s -o exit | FileCheck %s
breakpoint set -n main
OpenPOWER on IntegriCloud