|
| 1 | +// Test that when: |
| 2 | +// |
| 3 | +// 1. Using -incremental -v -driver-show-incremental, but... |
| 4 | +// 2. ...options that disable incremental compilation, such as whole module |
| 5 | +// optimization or bitcode embedding are specified... |
| 6 | +// |
| 7 | +// ...then the driver prints a message indicating that incremental compilation |
| 8 | +// is disabled. If both are specified, the driver should only print one message. |
| 9 | + |
| 10 | + |
| 11 | +// RUN: rm -rf %t && cp -r %S/Inputs/one-way/ %t |
| 12 | +// RUN: %S/Inputs/touch.py 443865900 %t/* |
| 13 | +// RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0]}}' > %t/main~buildrecord.swiftdeps |
| 14 | + |
| 15 | +// RUN: cd %t && %swiftc_driver -driver-use-frontend-path %S/Inputs/update-dependencies.py -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -output-file-map %t/output.json | %FileCheck --check-prefix CHECK-INCREMENTAL %s |
| 16 | +// CHECK-INCREMENTAL-NOT: Incremental compilation has been disabled |
| 17 | +// CHECK-INCREMENTAL: Queuing main.swift (initial) |
| 18 | + |
| 19 | +// RUN: cd %t && %swiftc_driver -driver-use-frontend-path %S/Inputs/update-dependencies.py -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -whole-module-optimization -output-file-map %t/output.json | %FileCheck --check-prefix CHECK-WMO %s |
| 20 | +// CHECK-WMO: Incremental compilation has been disabled{{.*}}whole module optimization |
| 21 | +// CHECK-WMO-NOT: Queuing main.swift (initial) |
| 22 | + |
| 23 | +// RUN: cd %t && %swiftc_driver -driver-use-frontend-path %S/Inputs/update-dependencies.py -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -embed-bitcode -output-file-map %t/output.json | %FileCheck --check-prefix CHECK-BITCODE %s |
| 24 | +// CHECK-BITCODE: Incremental compilation has been disabled{{.*}}LLVM IR bitcode |
| 25 | +// CHECK-BITCODE-NOT: Queuing main.swift (initial) |
| 26 | + |
| 27 | +// RUN: cd %t && %swiftc_driver -driver-use-frontend-path %S/Inputs/update-dependencies.py -c ./main.swift ./other.swift -module-name main -incremental -v -driver-show-incremental -whole-module-optimization -embed-bitcode -output-file-map %t/output.json | %FileCheck --check-prefix CHECK-WMO-AND-BITCODE %s |
| 28 | +// CHECK-WMO-AND-BITCODE: Incremental compilation has been disabled{{.*}}whole module optimization |
| 29 | +// CHECK-WMO-AND-BITCODE-NOT: Incremental compilation has been disabled |
| 30 | +// CHECK-WMO-AND-BITCODE-NOT: Queuing main.swift (initial) |
| 31 | + |
0 commit comments