Home | History | Annotate | Download | only in Driver
      1 // Check that we split debug output properly
      2 //
      3 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t
      4 // RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s
      5 //
      6 // CHECK-ACTIONS: objcopy{{.*}}--extract-dwo{{.*}}"split-debug.dwo"
      7 // CHECK-ACTIONS: objcopy{{.*}}--strip-dwo{{.*}}"split-debug.o"
      8 
      9 
     10 // RUN: %clang -target x86_64-macosx -gsplit-dwarf -c -### %s 2> %t
     11 // RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s
     12 //
     13 // CHECK-NO-ACTIONS-NOT: -split-dwarf
     14 
     15 
     16 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -o Bad.x -### %s 2> %t
     17 // RUN: FileCheck -check-prefix=CHECK-BAD < %t %s
     18 //
     19 // CHECK-BAD-NOT: "Bad.dwo"
     20 
     21 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t
     22 // RUN: FileCheck -check-prefix=CHECK-OPTION < %t %s
     23 //
     24 // CHECK-OPTION: "-split-dwarf-file" "split-debug.dwo"
     25 
     26 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -S -### %s 2> %t
     27 // RUN: FileCheck -check-prefix=CHECK-ASM < %t %s
     28 //
     29 // CHECK-ASM-NOT: objcopy
     30 
     31 // RUN: %clang -target x86_64-unknown-linux-gnu -no-integrated-as -gsplit-dwarf -c -### %s 2> %t
     32 // RUN: FileCheck -check-prefix=CHECK-IAS < %t %s
     33 //
     34 // CHECK-IAS: objcopy
     35 
     36 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -gmlt -S -### %s 2> %t
     37 // RUN: FileCheck -check-prefix=CHECK-GMLT-OVER-SPLIT < %t %s
     38 //
     39 // CHECK-GMLT-OVER-SPLIT: "-debug-info-kind=line-tables-only"
     40 // CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf=Enable"
     41 // CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf-file"
     42 
     43 // RUN: %clang -target x86_64-unknown-linux-gnu -gmlt -gsplit-dwarf -S -### %s 2> %t
     44 // RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-GMLT < %t %s
     45 //
     46 // CHECK-SPLIT-OVER-GMLT: "-split-dwarf=Enable" "-debug-info-kind=limited"
     47 // CHECK-SPLIT-OVER-GMLT: "-split-dwarf-file"
     48 
     49 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -g0 -S -### %s 2> %t
     50 // RUN: FileCheck -check-prefix=CHECK-G0-OVER-SPLIT < %t %s
     51 //
     52 // CHECK-G0-OVER-SPLIT-NOT: "-debug-info-kind
     53 // CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf=Enable"
     54 // CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-file"
     55 
     56 // RUN: %clang -target x86_64-unknown-linux-gnu -g0 -gsplit-dwarf -S -### %s 2> %t
     57 // RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-G0 < %t %s
     58 //
     59 // CHECK-SPLIT-OVER-G0: "-split-dwarf=Enable" "-debug-info-kind=limited"
     60 // CHECK-SPLIT-OVER-G0: "-split-dwarf-file"
     61