Author: Pavel Labath Date: 2019-10-31T10:40:37+01:00 New Revision: 9c739252261ea762d1bbbd8234d93c9038711fcd
URL: https://github.com/llvm/llvm-project/commit/9c739252261ea762d1bbbd8234d93c9038711fcd DIFF: https://github.com/llvm/llvm-project/commit/9c739252261ea762d1bbbd8234d93c9038711fcd.diff LOG: [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 Added: Modified: lldb/test/Shell/Commands/command-script-import.test lldb/test/Shell/Driver/TestSingleQuote.test lldb/test/Shell/Driver/TestTarget.test lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test lldb/test/Shell/ExecControl/StopHook/stop-hook.test lldb/test/Shell/Expr/TestIRMemoryMap.test lldb/test/Shell/Expr/TestIRMemoryMapWindows.test lldb/test/Shell/Heap/heap-cstr.test lldb/test/Shell/Host/TestCustomShell.test lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test lldb/test/Shell/Process/TestEnvironment.test lldb/test/Shell/Register/aarch64-fp-read.test lldb/test/Shell/Register/aarch64-gp-read.test lldb/test/Shell/Register/arm-fp-read.test lldb/test/Shell/Register/arm-gp-read.test lldb/test/Shell/Register/x86-64-gp-read.test lldb/test/Shell/Register/x86-64-gp-write.test lldb/test/Shell/Register/x86-64-read.test lldb/test/Shell/Register/x86-64-write.test lldb/test/Shell/Register/x86-64-xmm16-read.test lldb/test/Shell/Register/x86-64-xmm16-write.test lldb/test/Shell/Register/x86-64-ymm-read.test lldb/test/Shell/Register/x86-64-ymm-write.test lldb/test/Shell/Register/x86-64-ymm16-read.test lldb/test/Shell/Register/x86-64-ymm16-write.test lldb/test/Shell/Register/x86-64-zmm-read.test lldb/test/Shell/Register/x86-64-zmm-write.test lldb/test/Shell/Register/x86-gp-read.test lldb/test/Shell/Register/x86-gp-write.test lldb/test/Shell/Register/x86-mm-xmm-read.test lldb/test/Shell/Register/x86-mm-xmm-write.test lldb/test/Shell/Register/x86-ymm-read.test lldb/test/Shell/Register/x86-ymm-write.test lldb/test/Shell/Register/x86-zmm-read.test lldb/test/Shell/Register/x86-zmm-write.test lldb/test/Shell/Reproducer/Functionalities/TestDataFormatter.test lldb/test/Shell/Reproducer/Functionalities/TestImageList.test lldb/test/Shell/Reproducer/Functionalities/TestStepping.test lldb/test/Shell/Reproducer/Modules/TestModuleCXX.test lldb/test/Shell/Reproducer/TestDump.test lldb/test/Shell/Reproducer/TestFileRepro.test lldb/test/Shell/Reproducer/TestGDBRemoteRepro.test lldb/test/Shell/Reproducer/TestRelativePath.test lldb/test/Shell/Reproducer/TestReuseDirectory.test lldb/test/Shell/Reproducer/TestWorkingDir.test lldb/test/Shell/Settings/TestFrameFormatColor.test lldb/test/Shell/Settings/TestFrameFormatNoColor.test lldb/test/Shell/SymbolFile/DWARF/anon_class_w_and_wo_export_symbols.ll lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp lldb/test/Shell/SymbolFile/PDB/function-level-linking.test lldb/test/Shell/SymbolFile/target-symbols-add-unwind.test lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test lldb/test/Shell/Unwind/eh-frame-small-fde.test lldb/test/Shell/Unwind/prefer-debug-over-eh-frame.test lldb/test/Shell/Unwind/trap_frame_sym_ctx.test lldb/test/Shell/Unwind/unwind-plan-dwarf-dump.test lldb/test/Shell/Watchpoint/SetErrorCases.test lldb/test/Shell/helper/toolchain.py Removed: ################################################################################ diff --git a/lldb/test/Shell/Commands/command-script-import.test b/lldb/test/Shell/Commands/command-script-import.test index 18a043b49407..ab18844eae8c 100644 --- a/lldb/test/Shell/Commands/command-script-import.test +++ b/lldb/test/Shell/Commands/command-script-import.test @@ -3,7 +3,7 @@ # RUN: echo 'run' >> %t.in # RUN: echo 'command script import %S/Inputs/frame.py' >> %t.in -# RUN: %clang -g -O0 %S/Inputs/main.c -o %t.out +# RUN: %clang_host -g -O0 %S/Inputs/main.c -o %t.out # RUN: %lldb -b -s %t.in -o 'script print("script: {}".format(lldb.frame))' %t.out | FileCheck %s # Make sure that we don't have access to lldb.frame from the Python script. diff --git a/lldb/test/Shell/Driver/TestSingleQuote.test b/lldb/test/Shell/Driver/TestSingleQuote.test index 0ba4a1456fa1..af321ba04db3 100644 --- a/lldb/test/Shell/Driver/TestSingleQuote.test +++ b/lldb/test/Shell/Driver/TestSingleQuote.test @@ -1,5 +1,5 @@ # Make sure lldb can handle filenames with single quotes in them. -# RUN: %clang %p/Inputs/hello.c -g -o "%t-'pat" +# RUN: %clang_host %p/Inputs/hello.c -g -o "%t-'pat" # RUN: %lldb -s %s "%t-'pat" | FileCheck %s br set -p return diff --git a/lldb/test/Shell/Driver/TestTarget.test b/lldb/test/Shell/Driver/TestTarget.test index fcf7f776bbcc..59ab3a4228a1 100644 --- a/lldb/test/Shell/Driver/TestTarget.test +++ b/lldb/test/Shell/Driver/TestTarget.test @@ -1,7 +1,7 @@ # Make sure lldb resolves the target path. # RUN: mkdir -p %t/foo # RUN: cd %t/foo -# RUN: %clang %p/Inputs/hello.c -g -o a.out +# RUN: %clang_host %p/Inputs/hello.c -g -o a.out # RUN: %lldb -b a.out | FileCheck %s # CHECK: Current executable set to '{{.*}}foo{{[/\\\\]+}}a.out' diff --git a/lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test b/lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test index edb95ffc25e5..9deaa86baf8a 100644 --- a/lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test +++ b/lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test @@ -1,4 +1,4 @@ -# RUN: %clangxx -std=c++11 %p/Inputs/stop-hook-threads.cpp -g -o %t +# RUN: %clangxx_host -std=c++11 %p/Inputs/stop-hook-threads.cpp -g -o %t # RUN: %lldb -b -s %p/Inputs/stop-hook-threads-1.lldbinit -s %s -f %t \ # RUN: | FileCheck --check-prefix=CHECK --check-prefix=CHECK-NO-FILTER %s # RUN: %lldb -b -s %p/Inputs/stop-hook-threads-2.lldbinit -s %s -f %t \ diff --git a/lldb/test/Shell/ExecControl/StopHook/stop-hook.test b/lldb/test/Shell/ExecControl/StopHook/stop-hook.test index ca6495ef14ad..a06de6634ea1 100644 --- a/lldb/test/Shell/ExecControl/StopHook/stop-hook.test +++ b/lldb/test/Shell/ExecControl/StopHook/stop-hook.test @@ -1,4 +1,4 @@ -# RUN: %clang %p/Inputs/stop-hook.c -g -o %t +# RUN: %clang_host %p/Inputs/stop-hook.c -g -o %t # Test setting stop-hook per-function # RUN: %lldb -b -s %p/Inputs/stop-hook-1.lldbinit -s %s -f %t \ # RUN: | FileCheck --check-prefix=CHECK --check-prefix=CHECK-FUNC %s diff --git a/lldb/test/Shell/Expr/TestIRMemoryMap.test b/lldb/test/Shell/Expr/TestIRMemoryMap.test index a8f835b1676e..9dd0413be14c 100644 --- a/lldb/test/Shell/Expr/TestIRMemoryMap.test +++ b/lldb/test/Shell/Expr/TestIRMemoryMap.test @@ -1,6 +1,6 @@ # UNSUPPORTED: system-windows -# RUN: %clangxx %p/Inputs/call-function.cpp -g -o %t +# RUN: %clangxx_host %p/Inputs/call-function.cpp -g -o %t # RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-basic # RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-basic diff --git a/lldb/test/Shell/Expr/TestIRMemoryMapWindows.test b/lldb/test/Shell/Expr/TestIRMemoryMapWindows.test index f25db591fa51..ae29492c9ccc 100644 --- a/lldb/test/Shell/Expr/TestIRMemoryMapWindows.test +++ b/lldb/test/Shell/Expr/TestIRMemoryMapWindows.test @@ -1,6 +1,6 @@ # REQUIRES: system-windows -# RUN: %clang_cl /Zi /GS- %p/Inputs/call-function.cpp /c /o %t.obj +# RUN: %clang_cl_host /Zi /GS- %p/Inputs/call-function.cpp /c /o %t.obj # RUN: %msvc_link /debug:full %t.obj /out:%t # RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-basic diff --git a/lldb/test/Shell/Heap/heap-cstr.test b/lldb/test/Shell/Heap/heap-cstr.test index 00d19ffbe47f..4515eb56aabb 100644 --- a/lldb/test/Shell/Heap/heap-cstr.test +++ b/lldb/test/Shell/Heap/heap-cstr.test @@ -1,5 +1,5 @@ # REQUIRES: system-darwin -# RUN: %clang %p/Inputs/cstr.c -g -o %t +# RUN: %clang_host %p/Inputs/cstr.c -g -o %t # RUN: %lldb -b -s %s -f %t | FileCheck %s br set -p return diff --git a/lldb/test/Shell/Host/TestCustomShell.test b/lldb/test/Shell/Host/TestCustomShell.test index 245535725866..fd97b4c2b06e 100644 --- a/lldb/test/Shell/Host/TestCustomShell.test +++ b/lldb/test/Shell/Host/TestCustomShell.test @@ -7,7 +7,7 @@ # XFAIL: system-netbsd # XFAIL: system-openbsd -# RUN: %clang %S/Inputs/simple.c -g -o %t.out +# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out # RUN: SHELL=bogus %lldb %t.out -b -o 'run' 2>&1 | FileCheck %s --check-prefix ERROR # RUN: env -i %lldb %t.out -b -o 'run' 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test index 93c524f05527..cf073fc16cb7 100644 --- a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test +++ b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test @@ -3,7 +3,7 @@ # We want to keep the symbol "multiplyByThree" in the .dynamic section and not # have it put the default .symtab section. # RUN: echo "{multiplyByThree;};" > %T/dynmic-symbols.txt -# RUN: %clang -Wl,--dynamic-list=%T/dynmic-symbols.txt -g -o %t.binary %p/Inputs/minidebuginfo-main.c +# RUN: %clang_host -Wl,--dynamic-list=%T/dynmic-symbols.txt -g -o %t.binary %p/Inputs/minidebuginfo-main.c # The following section is adapted from GDB's official documentation: # http://sourceware.org/gdb/current/onlinedocs/gdb/MiniDebugInfo.html#MiniDebugInfo diff --git a/lldb/test/Shell/Process/TestEnvironment.test b/lldb/test/Shell/Process/TestEnvironment.test index 355feb306cdc..a9c624b8a4ec 100644 --- a/lldb/test/Shell/Process/TestEnvironment.test +++ b/lldb/test/Shell/Process/TestEnvironment.test @@ -2,7 +2,7 @@ UNSUPPORTED: system-windows The double quotes around "BAR" ensure we don't match the command. -RUN: %clangxx -std=c++11 %p/Inputs/env.cpp -o %t +RUN: %clangxx_host -std=c++11 %p/Inputs/env.cpp -o %t RUN: %lldb %t -o 'process launch --environment FOO="BAR"' | FileCheck %s RUN: %lldb %t -o 'env FOO="BAR"' -o 'process launch' | FileCheck %s diff --git a/lldb/test/Shell/Register/aarch64-fp-read.test b/lldb/test/Shell/Register/aarch64-fp-read.test index 1f4971ba4292..b433c726cad7 100644 --- a/lldb/test/Shell/Register/aarch64-fp-read.test +++ b/lldb/test/Shell/Register/aarch64-fp-read.test @@ -1,5 +1,5 @@ # REQUIRES: native && target-aarch64 -# RUN: %clangxx -fomit-frame-pointer %p/Inputs/aarch64-fp-read.cpp -o %t +# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/aarch64-fp-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/aarch64-gp-read.test b/lldb/test/Shell/Register/aarch64-gp-read.test index c400bc3a51a1..8a51e66411d2 100644 --- a/lldb/test/Shell/Register/aarch64-gp-read.test +++ b/lldb/test/Shell/Register/aarch64-gp-read.test @@ -1,5 +1,5 @@ # REQUIRES: native && target-aarch64 -# RUN: %clangxx -fomit-frame-pointer %p/Inputs/aarch64-gp-read.cpp -o %t +# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/aarch64-gp-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/arm-fp-read.test b/lldb/test/Shell/Register/arm-fp-read.test index 21af9074e3b3..538d6af54dcf 100644 --- a/lldb/test/Shell/Register/arm-fp-read.test +++ b/lldb/test/Shell/Register/arm-fp-read.test @@ -1,5 +1,5 @@ # REQUIRES: native && target-arm -# RUN: %clangxx -fomit-frame-pointer %p/Inputs/arm-fp-read.cpp -o %t +# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/arm-fp-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/arm-gp-read.test b/lldb/test/Shell/Register/arm-gp-read.test index 73c1034b6e23..bcb289b880a7 100644 --- a/lldb/test/Shell/Register/arm-gp-read.test +++ b/lldb/test/Shell/Register/arm-gp-read.test @@ -1,5 +1,5 @@ # REQUIRES: native && target-arm -# RUN: %clangxx -fomit-frame-pointer %p/Inputs/arm-gp-read.cpp -o %t +# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/arm-gp-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-gp-read.test b/lldb/test/Shell/Register/x86-64-gp-read.test index 56f9a631db02..142f3d965837 100644 --- a/lldb/test/Shell/Register/x86-64-gp-read.test +++ b/lldb/test/Shell/Register/x86-64-gp-read.test @@ -1,6 +1,6 @@ # XFAIL: system-windows # REQUIRES: native && target-x86_64 -# RUN: %clangxx -fomit-frame-pointer %p/Inputs/x86-64-gp-read.cpp -o %t +# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/x86-64-gp-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-gp-write.test b/lldb/test/Shell/Register/x86-64-gp-write.test index c79de92b55a8..747ab59555bc 100644 --- a/lldb/test/Shell/Register/x86-64-gp-write.test +++ b/lldb/test/Shell/Register/x86-64-gp-write.test @@ -1,6 +1,6 @@ # UNSUPPORTED: system-darwin # REQUIRES: native && target-x86_64 -# RUN: %clangxx -fomit-frame-pointer %p/Inputs/x86-64-gp-write.cpp -o %t +# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/x86-64-gp-write.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-read.test b/lldb/test/Shell/Register/x86-64-read.test index 090b34a76863..fc093190c256 100644 --- a/lldb/test/Shell/Register/x86-64-read.test +++ b/lldb/test/Shell/Register/x86-64-read.test @@ -1,6 +1,6 @@ # XFAIL: system-windows # REQUIRES: native && target-x86_64 -# RUN: %clangxx %p/Inputs/x86-64-read.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-64-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-write.test b/lldb/test/Shell/Register/x86-64-write.test index 362e514450f5..76a9d237c317 100644 --- a/lldb/test/Shell/Register/x86-64-write.test +++ b/lldb/test/Shell/Register/x86-64-write.test @@ -1,7 +1,7 @@ # XFAIL: system-darwin # XFAIL: system-windows # REQUIRES: native && (target-x86 || target-x86_64) && native-cpu-sse -# RUN: %clangxx %p/Inputs/x86-64-write.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-64-write.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-xmm16-read.test b/lldb/test/Shell/Register/x86-64-xmm16-read.test index 9d060c88cef6..3e6b8b002aa0 100644 --- a/lldb/test/Shell/Register/x86-64-xmm16-read.test +++ b/lldb/test/Shell/Register/x86-64-xmm16-read.test @@ -4,7 +4,7 @@ # XFAIL: system-windows # XFAIL: system-darwin # REQUIRES: native && target-x86_64 && native-cpu-avx512f -# RUN: %clangxx %p/Inputs/x86-zmm-read.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-zmm-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-xmm16-write.test b/lldb/test/Shell/Register/x86-64-xmm16-write.test index 8c7ad8d7dca2..447e2d7e00ab 100644 --- a/lldb/test/Shell/Register/x86-64-xmm16-write.test +++ b/lldb/test/Shell/Register/x86-64-xmm16-write.test @@ -4,7 +4,7 @@ # XFAIL: system-netbsd # XFAIL: system-windows # REQUIRES: native && target-x86 && native-cpu-avx512f -# RUN: %clangxx %p/Inputs/x86-zmm-write.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-zmm-write.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-ymm-read.test b/lldb/test/Shell/Register/x86-64-ymm-read.test index dbb5c8a6962e..0d01b0937f1d 100644 --- a/lldb/test/Shell/Register/x86-64-ymm-read.test +++ b/lldb/test/Shell/Register/x86-64-ymm-read.test @@ -1,6 +1,6 @@ # XFAIL: system-windows # REQUIRES: native && target-x86_64 && native-cpu-avx -# RUN: %clangxx %p/Inputs/x86-ymm-read.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-ymm-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-ymm-write.test b/lldb/test/Shell/Register/x86-64-ymm-write.test index 4fe04a92d386..05b3c2f52d2c 100644 --- a/lldb/test/Shell/Register/x86-64-ymm-write.test +++ b/lldb/test/Shell/Register/x86-64-ymm-write.test @@ -1,7 +1,7 @@ # XFAIL: system-darwin # XFAIL: system-windows # REQUIRES: native && target-x86_64 && native-cpu-avx -# RUN: %clangxx %p/Inputs/x86-ymm-write.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-ymm-write.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-ymm16-read.test b/lldb/test/Shell/Register/x86-64-ymm16-read.test index 5d81878c500d..ee7877910239 100644 --- a/lldb/test/Shell/Register/x86-64-ymm16-read.test +++ b/lldb/test/Shell/Register/x86-64-ymm16-read.test @@ -4,7 +4,7 @@ # XFAIL: system-windows # XFAIL: system-darwin # REQUIRES: native && target-x86_64 && native-cpu-avx512f -# RUN: %clangxx %p/Inputs/x86-zmm-read.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-zmm-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-ymm16-write.test b/lldb/test/Shell/Register/x86-64-ymm16-write.test index c3df572dbc81..aa62d4f0aed8 100644 --- a/lldb/test/Shell/Register/x86-64-ymm16-write.test +++ b/lldb/test/Shell/Register/x86-64-ymm16-write.test @@ -4,7 +4,7 @@ # XFAIL: system-netbsd # XFAIL: system-windows # REQUIRES: native && target-x86 && native-cpu-avx512f -# RUN: %clangxx %p/Inputs/x86-zmm-write.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-zmm-write.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-zmm-read.test b/lldb/test/Shell/Register/x86-64-zmm-read.test index 5f42b10652ee..92d97353e0fb 100644 --- a/lldb/test/Shell/Register/x86-64-zmm-read.test +++ b/lldb/test/Shell/Register/x86-64-zmm-read.test @@ -3,7 +3,7 @@ # XFAIL: system-netbsd # XFAIL: system-windows # REQUIRES: native && target-x86_64 && native-cpu-avx512f -# RUN: %clangxx %p/Inputs/x86-zmm-read.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-zmm-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-64-zmm-write.test b/lldb/test/Shell/Register/x86-64-zmm-write.test index 5efa7823fd45..4b22235c1b92 100644 --- a/lldb/test/Shell/Register/x86-64-zmm-write.test +++ b/lldb/test/Shell/Register/x86-64-zmm-write.test @@ -4,7 +4,7 @@ # XFAIL: system-netbsd # XFAIL: system-windows # REQUIRES: native && target-x86_64 && native-cpu-avx512f -# RUN: %clangxx %p/Inputs/x86-zmm-write.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-zmm-write.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-gp-read.test b/lldb/test/Shell/Register/x86-gp-read.test index ed0aa8965730..1cac59d9210b 100644 --- a/lldb/test/Shell/Register/x86-gp-read.test +++ b/lldb/test/Shell/Register/x86-gp-read.test @@ -1,6 +1,6 @@ # XFAIL: system-windows # REQUIRES: native && target-x86 -# RUN: %clangxx -fomit-frame-pointer %p/Inputs/x86-gp-read.cpp -o %t +# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/x86-gp-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-gp-write.test b/lldb/test/Shell/Register/x86-gp-write.test index 22f92738a5d7..c422ffd95bea 100644 --- a/lldb/test/Shell/Register/x86-gp-write.test +++ b/lldb/test/Shell/Register/x86-gp-write.test @@ -1,6 +1,6 @@ # XFAIL: system-windows # REQUIRES: native && target-x86 -# RUN: %clangxx -fomit-frame-pointer %p/Inputs/x86-gp-write.cpp -o %t +# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/x86-gp-write.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-mm-xmm-read.test b/lldb/test/Shell/Register/x86-mm-xmm-read.test index ee2095510170..bdf193bbe8b8 100644 --- a/lldb/test/Shell/Register/x86-mm-xmm-read.test +++ b/lldb/test/Shell/Register/x86-mm-xmm-read.test @@ -1,7 +1,7 @@ # XFAIL: system-darwin # XFAIL: system-windows # REQUIRES: native && (target-x86 || target-x86_64) && native-cpu-sse -# RUN: %clangxx %p/Inputs/x86-mm-xmm-read.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-mm-xmm-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-mm-xmm-write.test b/lldb/test/Shell/Register/x86-mm-xmm-write.test index 7325cf1c3aae..6f380bd37902 100644 --- a/lldb/test/Shell/Register/x86-mm-xmm-write.test +++ b/lldb/test/Shell/Register/x86-mm-xmm-write.test @@ -1,7 +1,7 @@ # XFAIL: system-darwin # XFAIL: system-windows # REQUIRES: native && (target-x86 || target-x86_64) && native-cpu-sse -# RUN: %clangxx %p/Inputs/x86-mm-xmm-write.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-mm-xmm-write.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-ymm-read.test b/lldb/test/Shell/Register/x86-ymm-read.test index 18fcf0e4cc10..c59b0b9a151f 100644 --- a/lldb/test/Shell/Register/x86-ymm-read.test +++ b/lldb/test/Shell/Register/x86-ymm-read.test @@ -1,6 +1,6 @@ # XFAIL: system-windows # REQUIRES: native && target-x86 && native-cpu-avx -# RUN: %clangxx %p/Inputs/x86-ymm-read.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-ymm-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-ymm-write.test b/lldb/test/Shell/Register/x86-ymm-write.test index 9938cdf67191..2eafd8f340f4 100644 --- a/lldb/test/Shell/Register/x86-ymm-write.test +++ b/lldb/test/Shell/Register/x86-ymm-write.test @@ -1,6 +1,6 @@ # XFAIL: system-windows # REQUIRES: native && target-x86 && native-cpu-avx -# RUN: %clangxx %p/Inputs/x86-ymm-write.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-ymm-write.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-zmm-read.test b/lldb/test/Shell/Register/x86-zmm-read.test index a45d1ef97e43..77ccb3862942 100644 --- a/lldb/test/Shell/Register/x86-zmm-read.test +++ b/lldb/test/Shell/Register/x86-zmm-read.test @@ -3,7 +3,7 @@ # XFAIL: system-netbsd # XFAIL: system-windows # REQUIRES: native && target-x86 && native-cpu-avx512f -# RUN: %clangxx %p/Inputs/x86-zmm-read.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-zmm-read.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Register/x86-zmm-write.test b/lldb/test/Shell/Register/x86-zmm-write.test index 6a499c311a60..ebf84af810c1 100644 --- a/lldb/test/Shell/Register/x86-zmm-write.test +++ b/lldb/test/Shell/Register/x86-zmm-write.test @@ -3,7 +3,7 @@ # XFAIL: system-netbsd # XFAIL: system-windows # REQUIRES: native && target-x86 && native-cpu-avx512f -# RUN: %clangxx %p/Inputs/x86-zmm-write.cpp -o %t +# RUN: %clangxx_host %p/Inputs/x86-zmm-write.cpp -o %t # RUN: %lldb -b -s %s %t | FileCheck %s process launch diff --git a/lldb/test/Shell/Reproducer/Functionalities/TestDataFormatter.test b/lldb/test/Shell/Reproducer/Functionalities/TestDataFormatter.test index 8ee181e80357..7db8bc4b36cf 100644 --- a/lldb/test/Shell/Reproducer/Functionalities/TestDataFormatter.test +++ b/lldb/test/Shell/Reproducer/Functionalities/TestDataFormatter.test @@ -3,7 +3,7 @@ # This tests that data formatters continue to work when replaying a reproducer. # RUN: rm -rf %t.repro -# RUN: %clangxx %S/Inputs/foo.cpp -g -o %t.out +# RUN: %clangxx_host %S/Inputs/foo.cpp -g -o %t.out # RUN: %lldb -x -b -s %S/Inputs/DataFormatter.in --capture --capture-path %t.repro %t.out | FileCheck %s # RUN: %lldb --replay %t.repro | FileCheck %s diff --git a/lldb/test/Shell/Reproducer/Functionalities/TestImageList.test b/lldb/test/Shell/Reproducer/Functionalities/TestImageList.test index d0abae164f00..db319093f174 100644 --- a/lldb/test/Shell/Reproducer/Functionalities/TestImageList.test +++ b/lldb/test/Shell/Reproducer/Functionalities/TestImageList.test @@ -3,7 +3,7 @@ # This tests that image list works when replaying. We arbitrarily assume # there's at least two entries and compare that they're identical. -# RUN: %clang %S/Inputs/stepping.c -g -o %t.out +# RUN: %clang_host %S/Inputs/stepping.c -g -o %t.out # RUN: rm -rf %t.txt diff --git a/lldb/test/Shell/Reproducer/Functionalities/TestStepping.test b/lldb/test/Shell/Reproducer/Functionalities/TestStepping.test index f43680f3e22a..1dec9a077c7b 100644 --- a/lldb/test/Shell/Reproducer/Functionalities/TestStepping.test +++ b/lldb/test/Shell/Reproducer/Functionalities/TestStepping.test @@ -3,7 +3,7 @@ # This tests that stepping continues to work when replaying a reproducer. # RUN: rm -rf %t.repro -# RUN: %clang %S/Inputs/stepping.c -O0 -g -o %t.out +# RUN: %clang_host %S/Inputs/stepping.c -O0 -g -o %t.out # RUN: grep -v '#' %s > %t.in # RUN: %lldb -x -b -s %t.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK diff --git a/lldb/test/Shell/Reproducer/Modules/TestModuleCXX.test b/lldb/test/Shell/Reproducer/Modules/TestModuleCXX.test index 843c7e6d1fff..67a11d4539f1 100644 --- a/lldb/test/Shell/Reproducer/Modules/TestModuleCXX.test +++ b/lldb/test/Shell/Reproducer/Modules/TestModuleCXX.test @@ -16,7 +16,7 @@ # RUN: cp %S/Inputs/module.modulemap %t.root # Compile the test case form the temporary root. -# RUN: %clang %t.root/main.cpp -g -fmodules -fcxx-modules -fmodules-cache-path=%t.clang-cache -o %t.root/a.out +# RUN: %clang_host %t.root/main.cpp -g -fmodules -fcxx-modules -fmodules-cache-path=%t.clang-cache -o %t.root/a.out # Capture the debug session. # RUN: %lldb -x -b -o 'settings set symbols.clang-modules-cache-path %t.lldb-cache' -s %S/Inputs/ModuleCXX.in --capture --capture-path %t.repro %t.root/a.out | FileCheck %s --check-prefix CAPTURE diff --git a/lldb/test/Shell/Reproducer/TestDump.test b/lldb/test/Shell/Reproducer/TestDump.test index 2e717152057c..3d4d21d98e50 100644 --- a/lldb/test/Shell/Reproducer/TestDump.test +++ b/lldb/test/Shell/Reproducer/TestDump.test @@ -4,7 +4,7 @@ # Generate a reproducer. # RUN: mkdir -p %t # RUN: rm -rf %t.repro -# RUN: %clang %S/Inputs/simple.c -g -o %t/reproducer.out +# RUN: %clang_host %S/Inputs/simple.c -g -o %t/reproducer.out # RUN: %lldb -x -b -s %S/Inputs/FileCapture.in -o 'reproducer dump -p files' --capture --capture-path %t.repro %t/reproducer.out # RUN: %lldb -b -o 'reproducer dump -p files -f %t.repro' | FileCheck %s --check-prefix FILES diff --git a/lldb/test/Shell/Reproducer/TestFileRepro.test b/lldb/test/Shell/Reproducer/TestFileRepro.test index 31b767036893..0fc3d528445f 100644 --- a/lldb/test/Shell/Reproducer/TestFileRepro.test +++ b/lldb/test/Shell/Reproducer/TestFileRepro.test @@ -7,7 +7,7 @@ # that the string "testing" is not printed. # RUN: rm -rf %t.repro -# RUN: %clang %S/Inputs/simple.c -g -o %t.out +# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out # RUN: %lldb -x -b -s %S/Inputs/FileCapture.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE # RUN: rm %t.out # RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY diff --git a/lldb/test/Shell/Reproducer/TestGDBRemoteRepro.test b/lldb/test/Shell/Reproducer/TestGDBRemoteRepro.test index 09e566ffb955..04a3e5465bb5 100644 --- a/lldb/test/Shell/Reproducer/TestGDBRemoteRepro.test +++ b/lldb/test/Shell/Reproducer/TestGDBRemoteRepro.test @@ -7,7 +7,7 @@ # that the string "testing" is not printed. # RUN: rm -rf %t.repro -# RUN: %clang %S/Inputs/simple.c -g -o %t.out +# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out # RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE # RUN: env FOO=BAR %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY diff --git a/lldb/test/Shell/Reproducer/TestRelativePath.test b/lldb/test/Shell/Reproducer/TestRelativePath.test index 1c871ee81e8b..fa7518784550 100644 --- a/lldb/test/Shell/Reproducer/TestRelativePath.test +++ b/lldb/test/Shell/Reproducer/TestRelativePath.test @@ -3,6 +3,6 @@ # RUN: mkdir -p %t # RUN: cd %t # RUN: rm -rf ./foo -# RUN: %clang %S/Inputs/simple.c -g -o %t/reproducer.out +# RUN: %clang_host %S/Inputs/simple.c -g -o %t/reproducer.out # RUN: %lldb -x -b -s %S/Inputs/FileCapture.in -o 'reproducer dump -p files' --capture --capture-path ./foo %t/reproducer.out # RUN: %lldb --replay ./foo diff --git a/lldb/test/Shell/Reproducer/TestReuseDirectory.test b/lldb/test/Shell/Reproducer/TestReuseDirectory.test index 76c74b7ee1d1..31b71a0f2601 100644 --- a/lldb/test/Shell/Reproducer/TestReuseDirectory.test +++ b/lldb/test/Shell/Reproducer/TestReuseDirectory.test @@ -4,7 +4,7 @@ # reproducer functionality. # RUN: rm -rf %t.repro -# RUN: %clang %S/Inputs/simple.c -g -o %t.out +# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out # RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix CAPTURE # RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix CAPTURE # RUN: %lldb --replay %t.repro | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix REPLAY diff --git a/lldb/test/Shell/Reproducer/TestWorkingDir.test b/lldb/test/Shell/Reproducer/TestWorkingDir.test index fd41e1d43ad6..707916bae560 100644 --- a/lldb/test/Shell/Reproducer/TestWorkingDir.test +++ b/lldb/test/Shell/Reproducer/TestWorkingDir.test @@ -11,7 +11,7 @@ # RUN: mkdir -p %t # RUN: mkdir -p %t/binary # RUN: cd %t -# RUN: %clang %S/Inputs/simple.c -g -o binary/reproducer.out +# RUN: %clang_host %S/Inputs/simple.c -g -o binary/reproducer.out # RUN: %lldb -x -b -s %S/Inputs/WorkingDir.in --capture --capture-path %t.repro binary/reproducer.out # RUN: rm -rf %t/binary diff --git a/lldb/test/Shell/Settings/TestFrameFormatColor.test b/lldb/test/Shell/Settings/TestFrameFormatColor.test index 87be0a3749f3..970d7238e751 100644 --- a/lldb/test/Shell/Settings/TestFrameFormatColor.test +++ b/lldb/test/Shell/Settings/TestFrameFormatColor.test @@ -1,4 +1,4 @@ -# RUN: %clang -g -O0 %S/Inputs/main.c -o %t.out +# RUN: %clang_host -g -O0 %S/Inputs/main.c -o %t.out # RUN: %lldb -x -b -s %s %t.out | FileCheck %s settings set use-color true settings set -f frame-format "frame #${frame.index}: \`${ansi.fg.green}{${function.name-with-args}${ansi.normal}\n" diff --git a/lldb/test/Shell/Settings/TestFrameFormatNoColor.test b/lldb/test/Shell/Settings/TestFrameFormatNoColor.test index dd1a320f8829..2bcdb8e82bd9 100644 --- a/lldb/test/Shell/Settings/TestFrameFormatNoColor.test +++ b/lldb/test/Shell/Settings/TestFrameFormatNoColor.test @@ -1,4 +1,4 @@ -# RUN: %clang -g -O0 %S/Inputs/main.c -o %t.out +# RUN: %clang_host -g -O0 %S/Inputs/main.c -o %t.out # RUN: %lldb -x -b -s %s %t.out | FileCheck %s settings set use-color false settings set -f frame-format "frame #${frame.index}: \`${ansi.fg.green}{${function.name-with-args}${ansi.normal}\n" diff --git a/lldb/test/Shell/SymbolFile/DWARF/anon_class_w_and_wo_export_symbols.ll b/lldb/test/Shell/SymbolFile/DWARF/anon_class_w_and_wo_export_symbols.ll index aab0128264c1..40a8ac037c2a 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/anon_class_w_and_wo_export_symbols.ll +++ b/lldb/test/Shell/SymbolFile/DWARF/anon_class_w_and_wo_export_symbols.ll @@ -18,7 +18,7 @@ ; } a; ;``` ; -; RUN: %clang++ -g -c -o %t.o %s +; RUN: %clangxx_host -g -c -o %t.o %s ; RUN: lldb-test symbols -dump-clang-ast %t.o | FileCheck %s ; RUN: llvm-dwarfdump %t.o | FileCheck %s --check-prefix DWARFDUMP diff --git a/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp b/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp index 5e80c5c6d0b7..575ae4fdc9fc 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp +++ b/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp @@ -3,7 +3,7 @@ // Test to verify we are corectly generating anonymous flags when parsing // anonymous class and unnamed structs from DWARF to the a clang AST node. -// RUN: %clang++ -g -c -o %t.o %s +// RUN: %clangxx_host -g -c -o %t.o %s // RUN: lldb-test symbols -dump-clang-ast %t.o | FileCheck %s struct A { diff --git a/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test b/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test index 6da06d7b74f3..5964eea40adf 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test +++ b/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test @@ -1,22 +1,22 @@ # UNSUPPORTED: system-darwin, system-windows # Make sure DWARF v4 type units work. -# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \ +# RUN: %clangxx_host %S/Inputs/debug-types-expressions.cpp \ # RUN: -g -gdwarf-4 -fdebug-types-section -o %t4 # RUN: %lldb %t4 -s %s -o exit | FileCheck %s # Now do the same for DWARF v5. -# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \ +# RUN: %clangxx_host %S/Inputs/debug-types-expressions.cpp \ # RUN: -g -gdwarf-5 -fdebug-types-section -o %t5 # RUN: %lldb %t5 -s %s -o exit | FileCheck %s # Test type units in dwo files. -# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \ +# RUN: %clangxx_host %S/Inputs/debug-types-expressions.cpp \ # RUN: -g -gdwarf-4 -fdebug-types-section -o %t4dwo # RUN: %lldb %t4dwo -s %s -o exit | FileCheck %s # And type units+dwo+dwarf5. -# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \ +# RUN: %clangxx_host %S/Inputs/debug-types-expressions.cpp \ # RUN: -g -gdwarf-5 -fdebug-types-section -o %t5dwo # RUN: %lldb %t5dwo -s %s -o exit | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp b/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp index 576c4ab72442..9e79f23db2b7 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp +++ b/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp @@ -2,8 +2,8 @@ // have their object files loaded by lldb. Note that the env var ZERO_AR_DATE // requires the ld64 linker, which clang invokes by default. // REQUIRES: system-darwin -// RUN: %clang %s -g -c -o %t.o -// RUN: ZERO_AR_DATE=1 %clang %t.o -g -o %t +// RUN: %clang_host %s -g -c -o %t.o +// RUN: ZERO_AR_DATE=1 %clang_host %t.o -g -o %t // RUN: %lldb %t -o "breakpoint set -f %s -l 11" -o run -o exit | FileCheck %s // CHECK: stop reason = breakpoint diff --git a/lldb/test/Shell/SymbolFile/PDB/function-level-linking.test b/lldb/test/Shell/SymbolFile/PDB/function-level-linking.test index 37b2cbc761b8..ec0ef5744007 100644 --- a/lldb/test/Shell/SymbolFile/PDB/function-level-linking.test +++ b/lldb/test/Shell/SymbolFile/PDB/function-level-linking.test @@ -1,5 +1,5 @@ REQUIRES: system-windows, lld -RUN: %clang_cl /c /Zi /Gy %S/Inputs/FunctionLevelLinkingTest.cpp /o %t.obj +RUN: %clang_cl_host /c /Zi /Gy %S/Inputs/FunctionLevelLinkingTest.cpp /o %t.obj RUN: lld-link /debug:full /nodefaultlib /entry:main /order:@%S/Inputs/FunctionLevelLinkingTest.ord %t.obj /out:%t.exe RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols -verify %t.exe RUN: env LLDB_USE_NATIVE_PDB_READER=0 lldb-test symbols -verify %t.exe diff --git a/lldb/test/Shell/SymbolFile/target-symbols-add-unwind.test b/lldb/test/Shell/SymbolFile/target-symbols-add-unwind.test index c6542134fcf9..b4f0cc4c402c 100644 --- a/lldb/test/Shell/SymbolFile/target-symbols-add-unwind.test +++ b/lldb/test/Shell/SymbolFile/target-symbols-add-unwind.test @@ -4,7 +4,7 @@ # UNSUPPORTED: system-windows, system-darwin # RUN: cd %T -# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -g \ +# RUN: %clang_host %S/Inputs/target-symbols-add-unwind.c -g \ # RUN: -fno-unwind-tables -o target-symbols-add-unwind.debug # RUN: llvm-objcopy --strip-debug target-symbols-add-unwind.debug \ # RUN: target-symbols-add-unwind.stripped diff --git a/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test b/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test index 4613b104b96c..c0b6e5e50f86 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 368917a063ec..0ece6c2a12a3 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 f023a1e75fad..19e3ae18c25f 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 10f7892e928b..1bf1fb1d6e85 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 c378f56b4f6d..67b482b2df91 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 diff --git a/lldb/test/Shell/Watchpoint/SetErrorCases.test b/lldb/test/Shell/Watchpoint/SetErrorCases.test index 39556f98f96e..cc67d0adfc3f 100644 --- a/lldb/test/Shell/Watchpoint/SetErrorCases.test +++ b/lldb/test/Shell/Watchpoint/SetErrorCases.test @@ -1,4 +1,4 @@ -# RUN: %clangxx %p/Inputs/main.cpp -g -o %t.out +# RUN: %clangxx_host %p/Inputs/main.cpp -g -o %t.out # RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -s %s %t.out 2>&1 | FileCheck %s settings show interpreter.stop-command-source-on-error diff --git a/lldb/test/Shell/helper/toolchain.py b/lldb/test/Shell/helper/toolchain.py index d9e5c0593ec1..9d144bb5992a 100644 --- a/lldb/test/Shell/helper/toolchain.py +++ b/lldb/test/Shell/helper/toolchain.py @@ -85,7 +85,7 @@ def use_support_substitutions(config): # Set up substitutions for support tools. These tools can be overridden at the CMake # level (by specifying -DLLDB_LIT_TOOLS_DIR), installed, or as a last resort, we can use # the just-built version. - flags = [] + host_flags = ['--target=' + config.host_triple] if platform.system() in ['Darwin']: try: out = subprocess.check_output(['xcrun', '--show-sdk-path']).strip() @@ -95,26 +95,32 @@ def use_support_substitutions(config): if res == 0 and out: sdk_path = lit.util.to_string(out) llvm_config.lit_config.note('using SDKROOT: %r' % sdk_path) - flags = ['-isysroot', sdk_path] + host_flags += ['-isysroot', sdk_path] elif platform.system() in ['NetBSD', 'OpenBSD', 'Linux']: - flags = ['-pthread'] + host_flags += ['-pthread'] if sys.platform.startswith('netbsd'): # needed e.g. to use freshly built libc++ - flags += ['-L' + config.llvm_libs_dir, + host_flags += ['-L' + config.llvm_libs_dir, '-Wl,-rpath,' + config.llvm_libs_dir] # The clang module cache is used for building inferiors. - flags += ['-fmodules-cache-path={}'.format(config.clang_module_cache)] + host_flags += ['-fmodules-cache-path={}'.format(config.clang_module_cache)] + + host_flags = ' '.join(host_flags) + config.substitutions.append(('%clang_host', '%clang ' + host_flags)) + config.substitutions.append(('%clangxx_host', '%clangxx ' + host_flags)) + config.substitutions.append(('%clang_cl_host', '%clang_cl --target='+config.host_triple)) additional_tool_dirs=[] if config.lldb_lit_tools_dir: additional_tool_dirs.append(config.lldb_lit_tools_dir) - llvm_config.use_clang(additional_flags=flags, + llvm_config.use_clang(additional_flags=['--target=specify-a-target-or-use-a-_host-substitution'], additional_tool_dirs=additional_tool_dirs, required=True) + if sys.platform == 'win32': _use_msvc_substitutions(config) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits