mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SourceKit invokes the legacy driver. Providing this flag in the IDE means the command lines SourceKit forms to run semantic requests in the editor are all invalid. Teach the legacy driver to eat this flag. rdar://80811565
16 lines
993 B
Swift
16 lines
993 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: touch %t/file1.swift %t/file2.swift %t/file3.swift
|
|
// RUN: echo 'public func main() {}' >%t/main.swift
|
|
//
|
|
// RUN: %target-swiftc_driver -driver-skip-execution -c -emit-module -module-name main -driver-print-jobs %s -experimental-emit-module-separately %t/file1.swift %t/file2.swift %t/file3.swift %t/main.swift 2>^1 | %FileCheck -check-prefix NORMAL %s
|
|
// RUN: %target-swiftc_driver -driver-skip-execution -c -emit-module -module-name main -driver-print-jobs -incremental %s -experimental-emit-module-separately %t/file1.swift %t/file2.swift %t/file3.swift %t/main.swift 2>^1 | %FileCheck -check-prefix INCREMENTAL %s
|
|
|
|
// Just test that we eat this argument. Only the new driver knows what to do
|
|
// here. The legacy driver will just fall back to a merge-modules job as usual.
|
|
// NORMAL: swift
|
|
// NORMAL-NOT: -experimental-emit-module-separately
|
|
|
|
// INCREMENTAL: swift
|
|
// INCREMENTAL: -merge-modules
|
|
// INCREMENTAL-NOT: -experimental-emit-module-separately
|