Files
swift-mirror/test/Driver/emit_module_separately.swift
Robert Widmann 262e2b335d Eat -experimental-emit-module-separately
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
2021-07-23 13:29:29 -07:00

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