|
| 1 | +// RUN: %empty-directory(%t) |
| 2 | + |
| 3 | +// RUN: touch %t/a.swiftmodule |
| 4 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g -emit-module -module-name foo %s %t/a.swiftmodule 2>&1 | %FileCheck %s -check-prefix=SWIFTMODULE-DEBUG-INPUT |
| 5 | +// SWIFTMODULE-DEBUG-INPUT: 0: input, "{{.*}}actions-dsym.swift", swift |
| 6 | +// SWIFTMODULE-DEBUG-INPUT: 1: compile, {0}, swiftmodule |
| 7 | +// SWIFTMODULE-DEBUG-INPUT: 2: input, "{{.*}}a.swiftmodule", swift |
| 8 | +// SWIFTMODULE-DEBUG-INPUT: 3: merge-module, {1, 2}, swiftmodule |
| 9 | + |
| 10 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g %s 2>&1 | %FileCheck %s -check-prefix=DEBUG |
| 11 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -gnone -g %s 2>&1 | %FileCheck %s -check-prefix=DEBUG |
| 12 | +// DEBUG: 0: input, "{{.*}}actions-dsym.swift", swift |
| 13 | +// DEBUG: 1: compile, {0}, object |
| 14 | +// DEBUG: 2: merge-module, {1}, swiftmodule |
| 15 | +// DEBUG: 3: link, {1, 2}, image |
| 16 | +// DEBUG: 4: generate-dSYM, {3}, dSYM |
| 17 | + |
| 18 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -gnone %s 2>&1 | %FileCheck %s -check-prefix=BASIC |
| 19 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g -gnone %s 2>&1 | %FileCheck %s -check-prefix=BASIC |
| 20 | +// BASIC: 0: input, "{{.*}}actions-dsym.swift", swift |
| 21 | +// BASIC: 1: compile, {0}, object |
| 22 | +// BASIC: 2: link, {1}, image |
| 23 | + |
| 24 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g -verify-debug-info %s 2>&1 | %FileCheck %s -check-prefixes=DEBUG,VERIFY-DEBUG-INFO |
| 25 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -gnone -g -verify-debug-info %s 2>&1 | %FileCheck %s -check-prefixes=DEBUG,VERIFY-DEBUG-INFO |
| 26 | +// VERIFY-DEBUG-INFO: 5: verify-debug-info, {4}, none |
| 27 | + |
| 28 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -gdwarf-types -verify-debug-info %s 2>&1 | %FileCheck %s -check-prefixes=EXEC-AND-MODULE,VERIFY-DEBUG-DWARF |
| 29 | +// EXEC-AND-MODULE: 0: input, "{{.*}}actions-dsym.swift", swift |
| 30 | +// EXEC-AND-MODULE: 1: compile, {0}, object |
| 31 | +// EXEC-AND-MODULE: 2: merge-module, {1}, swiftmodule |
| 32 | +// EXEC-AND-MODULE: 3: link, {1}, image |
| 33 | +// VERIFY-DEBUG-DWARF-TYPES: 4: generate-dSYM, {3}, dSYM |
| 34 | +// VERIFY-DEBUG-DWARF-TYPES: 5: verify-debug-info, {4}, none |
| 35 | + |
| 36 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -gline-tables-only -verify-debug-info %s 2>&1 | %FileCheck %s -check-prefixes=BASIC,VERIFY-DEBUG-LINE-TABLES |
| 37 | +// VERIFY-DEBUG-LINE-TABLES-ONLY: 3: generate-dSYM, {2}, dSYM |
| 38 | +// VERIFY-DEBUG-LINE-TABLES-ONLY: 4: verify-debug-info, {3}, none |
| 39 | + |
| 40 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -gnone -verify-debug-info %s 2>&1 | %FileCheck %s -check-prefixes=MISSING-DEBUG-OPTION |
| 41 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g -gnone -verify-debug-info %s 2>&1 | %FileCheck %s -check-prefixes=MISSING-DEBUG-OPTION |
| 42 | +// MISSING-DEBUG-OPTION: warning: ignoring '-verify-debug-info'; no debug info is being generated |
| 43 | +// MISSING-DEBUG-OPTION: 0: input, "{{.*}}actions-dsym.swift", swift |
| 44 | +// MISSING-DEBUG-OPTION: 1: compile, {0}, object |
| 45 | +// MISSING-DEBUG-OPTION: 2: link, {1}, image |
| 46 | + |
| 47 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g -c %s 2>&1 | %FileCheck %s -check-prefix=DEBUG-OBJECT |
| 48 | +// DEBUG-OBJECT: 0: input, "{{.*}}actions-dsym.swift", swift |
| 49 | +// DEBUG-OBJECT: 1: compile, {0}, object |
| 50 | +// DEBUG-OBJECT-NOT: merge-module |
| 51 | + |
| 52 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g -emit-executable -emit-module %s 2>&1 | %FileCheck %s -check-prefix=DEBUG-MODULE |
| 53 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -gnone -g -emit-executable -emit-module %s 2>&1 | %FileCheck %s -check-prefix=DEBUG-MODULE |
| 54 | +// DEBUG-MODULE: 0: input, "{{.*}}actions-dsym.swift", swift |
| 55 | +// DEBUG-MODULE: 1: compile, {0}, object |
| 56 | +// DEBUG-MODULE: 2: merge-module, {1}, swiftmodule |
| 57 | +// DEBUG-MODULE: 3: link, {1, 2}, image |
| 58 | +// DEBUG-MODULE: 4: generate-dSYM, {3}, dSYM |
| 59 | + |
| 60 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -gnone -emit-executable -emit-module %s 2>&1 | %FileCheck %s -check-prefix=EXEC-AND-MODULE |
| 61 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g -gnone -emit-executable -emit-module %s 2>&1 | %FileCheck %s -check-prefix=EXEC-AND-MODULE |
| 62 | + |
| 63 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g %S/Inputs/main.swift %S/../Inputs/empty.swift %s -module-name actions 2>&1 | %FileCheck %s -check-prefix=DEBUG-MULTI |
| 64 | +// DEBUG-MULTI: 0: input, "{{.*}}Inputs/main.swift", swift |
| 65 | +// DEBUG-MULTI: 1: compile, {0}, object |
| 66 | +// DEBUG-MULTI: 2: input, "{{.*}}Inputs/empty.swift", swift |
| 67 | +// DEBUG-MULTI: 3: compile, {2}, object |
| 68 | +// DEBUG-MULTI: 4: input, "{{.*}}actions-dsym.swift", swift |
| 69 | +// DEBUG-MULTI: 5: compile, {4}, object |
| 70 | +// DEBUG-MULTI: 6: merge-module, {1, 3, 5}, swiftmodule |
| 71 | +// DEBUG-MULTI: 7: link, {1, 3, 5, 6}, image |
| 72 | +// DEBUG-MULTI: 8: generate-dSYM, {7}, dSYM |
| 73 | + |
| 74 | + |
| 75 | +// RUN: touch %t/a.o %t/b.o |
| 76 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g %t/a.o %t/b.o -o main 2>&1 | %FileCheck %s -check-prefix=LINK-ONLY |
| 77 | +// LINK-ONLY: 0: input, "{{.*}}/a.o", object |
| 78 | +// LINK-ONLY: 1: input, "{{.*}}/b.o", object |
| 79 | +// LINK-ONLY: 2: link, {0, 1}, image |
| 80 | + |
| 81 | +// RUN: touch %t/a.swiftmodule %t/b.swiftmodule |
| 82 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g %t/a.o %t/b.o %t/a.swiftmodule %t/b.swiftmodule -o main 2>&1 | %FileCheck %s -check-prefix=DEBUG-LINK-ONLY |
| 83 | +// DEBUG-LINK-ONLY: 0: input, "{{.*}}/a.o", object |
| 84 | +// DEBUG-LINK-ONLY: 1: input, "{{.*}}/b.o", object |
| 85 | +// DEBUG-LINK-ONLY: 2: input, "{{.*}}/a.swiftmodule", swiftmodule |
| 86 | +// DEBUG-LINK-ONLY: 3: input, "{{.*}}/b.swiftmodule", swiftmodule |
| 87 | +// DEBUG-LINK-ONLY: 4: link, {0, 1, 2, 3}, image |
| 88 | +// DEBUG-LINK-ONLY: 5: generate-dSYM, {4}, dSYM |
| 89 | + |
| 90 | +// RUN: touch %t/c.swift |
| 91 | +// LINK-SWIFTMODULES: 0: input, "{{.*}}/c.swift", swift |
| 92 | +// LINK-SWIFTMODULES: 1: compile, {0}, object |
| 93 | +// LINK-SWIFTMODULES: 2: input, "{{.*}}/a.o", object |
| 94 | +// LINK-SWIFTMODULES: 3: input, "{{.*}}/b.o", object |
| 95 | +// LINK-SWIFTMODULES: 4: input, "{{.*}}/a.swiftmodule", swiftmodule |
| 96 | +// LINK-SWIFTMODULES: 5: input, "{{.*}}/b.swiftmodule", swiftmodule |
| 97 | +// LINK-SWIFTMODULES: 6: link, {1, 2, 3, 4, 5}, image |
| 98 | + |
| 99 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g %t/c.swift %t/a.o %t/b.o %t/a.swiftmodule %t/b.swiftmodule -o main 2>&1 | %FileCheck %s -check-prefix=LINK-DEBUG-SWIFTMODULES |
| 100 | +// LINK-DEBUG-SWIFTMODULES: 0: input, "{{.*}}/c.swift", swift |
| 101 | +// LINK-DEBUG-SWIFTMODULES: 1: compile, {0}, object |
| 102 | +// LINK-DEBUG-SWIFTMODULES: 2: input, "{{.*}}/a.o", object |
| 103 | +// LINK-DEBUG-SWIFTMODULES: 3: input, "{{.*}}/b.o", object |
| 104 | +// LINK-DEBUG-SWIFTMODULES: 4: input, "{{.*}}/a.swiftmodule", swiftmodule |
| 105 | +// LINK-DEBUG-SWIFTMODULES: 5: input, "{{.*}}/b.swiftmodule", swiftmodule |
| 106 | +// LINK-DEBUG-SWIFTMODULES: 6: merge-module, {1}, swiftmodule |
| 107 | +// LINK-DEBUG-SWIFTMODULES: 7: link, {1, 2, 3, 4, 5, 6}, image |
| 108 | + |
| 109 | +// RUN: touch %t/a.o %t/b.o |
| 110 | +// RUN: %swiftc_driver -driver-print-actions -target x86_64-apple-macosx10.9 -g %S/Inputs/main.swift %S/../Inputs/empty.swift %s -module-name actions -force-single-frontend-invocation 2>&1 | %FileCheck %s -check-prefix=WHOLE-MODULE |
| 111 | +// WHOLE-MODULE: 0: input, "{{.*}}Inputs/main.swift", swift |
| 112 | +// WHOLE-MODULE: 1: input, "{{.*}}Inputs/empty.swift", swift |
| 113 | +// WHOLE-MODULE: 2: input, "{{.*}}actions-dsym.swift", swift |
| 114 | +// WHOLE-MODULE: 3: compile, {0, 1, 2}, object |
| 115 | +// WHOLE-MODULE: 4: link, {3}, image |
| 116 | +// WHOLE-MODULE: 5: generate-dSYM, {4}, dSYM |
0 commit comments