| 1 |
// Confirm that -gsplit-dwarf=DIR is passed to linker |
| 2 |
|
| 3 |
// DEFINE: %{RUN-ELF} = %clang --target=x86_64-unknown-linux -### %s \ |
| 4 |
// DEFINE: -flto=thin -gsplit-dwarf |
| 5 |
|
| 6 |
// RUN: %{RUN-ELF} -o a.out 2> %t |
| 7 |
// RUN: FileCheck -check-prefix=CHECK-LINK-ELF-DWO-DIR-DEFAULT < %t %s |
| 8 |
// RUN: %clang_cl --target=x86_64-unknown-windows-msvc -### -fuse-ld=lld -flto -gsplit-dwarf -o a.out -- %s 2> %t |
| 9 |
// RUN: FileCheck -check-prefix=CHECK-LINK-COFF-DWO-DIR-DEFAULT < %t %s |
| 10 |
// |
| 11 |
// CHECK-LINK-ELF-DWO-DIR-DEFAULT: "-plugin-opt=dwo_dir=a.out-dwo" |
| 12 |
// CHECK-LINK-COFF-DWO-DIR-DEFAULT: "/dwodir:a.out_dwo" |
| 13 |
|
| 14 |
// Check -dumpdir effect on -gsplit-dwarf. |
| 15 |
// |
| 16 |
// DEFINE: %{RUN-DUMPDIR} = %{RUN-ELF} -dumpdir /dir/file.ext |
| 17 |
// |
| 18 |
// RUN: %{RUN-ELF} 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O |
| 19 |
// RUN: %{RUN-ELF} -o FOO 2>&1 | FileCheck %s -check-prefix=CHECK-O |
| 20 |
// RUN: %{RUN-DUMPDIR} 2>&1 | FileCheck %s -check-prefix=CHECK-DUMPDIR |
| 21 |
// RUN: %{RUN-DUMPDIR} -o FOO 2>&1 | FileCheck %s -check-prefix=CHECK-DUMPDIR |
| 22 |
// |
| 23 |
// CHECK-NO-O: "-plugin-opt=dwo_dir=a-dwo" |
| 24 |
// CHECK-O: "-plugin-opt=dwo_dir=FOO-dwo" |
| 25 |
// CHECK-DUMPDIR: "-plugin-opt=dwo_dir=/dir/file.extdwo" |