mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When producing frontend arguments for sourcekitd, force the output mode to -typecheck so that we do not create any temporary output files in the driver. Previously, any sourcekitd operation that created a compiler invocation would create 0-sized .o file inside $TMPDIR that would never be cleaned up. The new swift-driver project handles temporaries much better as VirtualPath, and should not need this approach. rdar://62366123
30 lines
1.3 KiB
Swift
30 lines
1.3 KiB
Swift
// REQUIRES: shell
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: env TMPDIR=%t __XPC_TMPDIR=%t %sourcekitd-test -req=syntax-map %s
|
|
// RUN: ls %t/ | count 0
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: env TMPDIR=%t __XPC_TMPDIR=%t %sourcekitd-test -req=syntax-map %s -- %s
|
|
// RUN: ls %t/ | count 0
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: env TMPDIR=%t __XPC_TMPDIR=%t %sourcekitd-test -req=syntax-map %s -- %s -c -o %t/foo.o
|
|
// RUN: ls %t/ | count 0
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: env TMPDIR=%t __XPC_TMPDIR=%t %sourcekitd-test -req=sema %s -- %s
|
|
// RUN: ls %t/ | count 0
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: env TMPDIR=%t __XPC_TMPDIR=%t %sourcekitd-test -req=sema %s -- %s -c -o %t/foo.o
|
|
// RUN: ls %t/ | count 0
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: env TMPDIR=%t __XPC_TMPDIR=%t %sourcekitd-test -req=sema %s -- %s -emit-module -module-name main -emit-module-path %t/main.swiftmodule -emit-module-interface -enable-library-evolution -emit-module-interface-path %t/main.swiftinterface -emit-objc-header -emit-objc-header-path %t/main.h -c -o %t/foo.o
|
|
// RUN: ls %t/ | count 0
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: env TMPDIR=%t __XPC_TMPDIR=%t %sourcekitd-test -req=sema %s -- %s -emit-module -module-name main -emit-module-path %t/main.swiftmodule -emit-executable -o %t/foo
|
|
// RUN: ls %t/ | count 0
|