blob: 6c69346646a43e085a4d220a9dbb748df55dfd90 [file] [log] [blame]
Eric Christopher2ba5fcb2013-02-05 07:29:57 +00001// Check that we split debug output properly
2//
Eric Christopher248357f2013-02-21 22:35:01 +00003// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t
Eric Christopher2ba5fcb2013-02-05 07:29:57 +00004// RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s
5//
Eric Christopher248357f2013-02-21 22:35:01 +00006// CHECK-ACTIONS: objcopy{{.*}}--extract-dwo{{.*}}"split-debug.dwo"
7// CHECK-ACTIONS: objcopy{{.*}}--strip-dwo{{.*}}"split-debug.o"
Eric Christopher2ba5fcb2013-02-05 07:29:57 +00008
Eric Christopher2ba5fcb2013-02-05 07:29:57 +00009
Eric Christopherd42fb732013-02-21 22:35:05 +000010// 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
Eric Christopher77569ff2013-02-22 01:33:46 +000014
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"
Eric Christopherd3804002013-02-22 20:12:52 +000020
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"
Eric Christopher30aa6b62013-06-05 23:58:15 +000025
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
David Blaikiece3e7a62015-07-30 21:42:22 +000035
David Blaikie3d0a0392016-08-24 23:22:36 +000036// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -gmlt -fno-split-dwarf-inlining -S -### %s 2> %t
37// RUN: FileCheck -check-prefix=CHECK-GMLT-WITH-SPLIT < %t %s
38//
39// CHECK-GMLT-WITH-SPLIT: "-split-dwarf=Enable"
40// CHECK-GMLT-WITH-SPLIT: "-debug-info-kind=line-tables-only"
41// CHECK-GMLT-WITH-SPLIT: "-split-dwarf-file"
42
43// RUN: %clang -target x86_64-unknown-linux-gnu -gmlt -gsplit-dwarf -fno-split-dwarf-inlining -S -### %s 2> %t
44// RUN: FileCheck -check-prefix=CHECK-SPLIT-WITH-GMLT < %t %s
45//
46// CHECK-SPLIT-WITH-GMLT: "-split-dwarf=Enable"
47// CHECK-SPLIT-WITH-GMLT: "-debug-info-kind=line-tables-only"
48// CHECK-SPLIT-WITH-GMLT: "-split-dwarf-file"
49
David Blaikiece3e7a62015-07-30 21:42:22 +000050// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -gmlt -S -### %s 2> %t
51// RUN: FileCheck -check-prefix=CHECK-GMLT-OVER-SPLIT < %t %s
52//
David Blaikiece3e7a62015-07-30 21:42:22 +000053// CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf=Enable"
David Blaikie3d0a0392016-08-24 23:22:36 +000054// CHECK-GMLT-OVER-SPLIT: "-debug-info-kind=line-tables-only"
David Blaikiece3e7a62015-07-30 21:42:22 +000055// CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf-file"
56
57// RUN: %clang -target x86_64-unknown-linux-gnu -gmlt -gsplit-dwarf -S -### %s 2> %t
58// RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-GMLT < %t %s
59//
Douglas Katzman3459ce22015-10-08 04:24:12 +000060// CHECK-SPLIT-OVER-GMLT: "-split-dwarf=Enable" "-debug-info-kind=limited"
David Blaikiece3e7a62015-07-30 21:42:22 +000061// CHECK-SPLIT-OVER-GMLT: "-split-dwarf-file"
Paul Robinson0334a042015-12-19 19:41:48 +000062
David Blaikie3d0a0392016-08-24 23:22:36 +000063// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -g0 -fno-split-dwarf-inlining -S -### %s 2> %t
64// RUN: FileCheck -check-prefix=CHECK-G0-OVER-SPLIT < %t %s
65//
66// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf=Enable"
67// CHECK-G0-OVER-SPLIT-NOT: "-debug-info-kind
68// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-file"
69
Paul Robinson0334a042015-12-19 19:41:48 +000070// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -g0 -S -### %s 2> %t
71// RUN: FileCheck -check-prefix=CHECK-G0-OVER-SPLIT < %t %s
72//
Paul Robinson0334a042015-12-19 19:41:48 +000073// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf=Enable"
David Blaikie3d0a0392016-08-24 23:22:36 +000074// CHECK-G0-OVER-SPLIT-NOT: "-debug-info-kind
Paul Robinson0334a042015-12-19 19:41:48 +000075// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-file"
76
77// RUN: %clang -target x86_64-unknown-linux-gnu -g0 -gsplit-dwarf -S -### %s 2> %t
78// RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-G0 < %t %s
79//
80// CHECK-SPLIT-OVER-G0: "-split-dwarf=Enable" "-debug-info-kind=limited"
81// CHECK-SPLIT-OVER-G0: "-split-dwarf-file"