26 lines · c
1// Confirm that -gsplit-dwarf=DIR is passed to linker2 3// DEFINE: %{RUN-ELF} = %clang --target=x86_64-unknown-linux -### %s \4// DEFINE: -flto=thin -gsplit-dwarf5 6// RUN: %{RUN-ELF} -o a.out 2> %t7// RUN: FileCheck -check-prefix=CHECK-LINK-ELF-DWO-DIR-DEFAULT < %t %s8// RUN: %clang_cl --target=x86_64-unknown-windows-msvc -### -fuse-ld=lld -flto -gsplit-dwarf -o a.out -- %s 2> %t9// RUN: FileCheck -check-prefix=CHECK-LINK-COFF-DWO-DIR-DEFAULT < %t %s10//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.ext17//18// RUN: %{RUN-ELF} 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O19// RUN: %{RUN-ELF} -o FOO 2>&1 | FileCheck %s -check-prefix=CHECK-O20// RUN: %{RUN-DUMPDIR} 2>&1 | FileCheck %s -check-prefix=CHECK-DUMPDIR21// RUN: %{RUN-DUMPDIR} -o FOO 2>&1 | FileCheck %s -check-prefix=CHECK-DUMPDIR22//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"26