diff options
Diffstat (limited to 'clang/test/Driver/lto-dwo.c')
-rw-r--r-- | clang/test/Driver/lto-dwo.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/clang/test/Driver/lto-dwo.c b/clang/test/Driver/lto-dwo.c index 206d4cb..5072765 100644 --- a/clang/test/Driver/lto-dwo.c +++ b/clang/test/Driver/lto-dwo.c @@ -1,9 +1,25 @@ // Confirm that -gsplit-dwarf=DIR is passed to linker -// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -gsplit-dwarf -o a.out 2> %t +// DEFINE: %{RUN-ELF} = %clang --target=x86_64-unknown-linux -### %s \ +// DEFINE: -flto=thin -gsplit-dwarf + +// RUN: %{RUN-ELF} -o a.out 2> %t // RUN: FileCheck -check-prefix=CHECK-LINK-ELF-DWO-DIR-DEFAULT < %t %s // RUN: %clang_cl --target=x86_64-unknown-windows-msvc -### -fuse-ld=lld -flto -gsplit-dwarf -o a.out -- %s 2> %t // RUN: FileCheck -check-prefix=CHECK-LINK-COFF-DWO-DIR-DEFAULT < %t %s // -// CHECK-LINK-ELF-DWO-DIR-DEFAULT: "-plugin-opt=dwo_dir=a.out_dwo" +// CHECK-LINK-ELF-DWO-DIR-DEFAULT: "-plugin-opt=dwo_dir=a.out-dwo" // CHECK-LINK-COFF-DWO-DIR-DEFAULT: "/dwodir:a.out_dwo" + +// Check -dumpdir effect on -gsplit-dwarf. +// +// DEFINE: %{RUN-DUMPDIR} = %{RUN-ELF} -dumpdir /dir/file.ext +// +// RUN: %{RUN-ELF} 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O +// RUN: %{RUN-ELF} -o FOO 2>&1 | FileCheck %s -check-prefix=CHECK-O +// RUN: %{RUN-DUMPDIR} 2>&1 | FileCheck %s -check-prefix=CHECK-DUMPDIR +// RUN: %{RUN-DUMPDIR} -o FOO 2>&1 | FileCheck %s -check-prefix=CHECK-DUMPDIR +// +// CHECK-NO-O: "-plugin-opt=dwo_dir=a-dwo" +// CHECK-O: "-plugin-opt=dwo_dir=FOO-dwo" +// CHECK-DUMPDIR: "-plugin-opt=dwo_dir=/dir/file.extdwo" |