mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
With this, we're out of the business of passing large numbers of input files on the command line to the frontend, which means we no longer overflow argv with a mere 1100 input files under whole-module optimization. In order to make sure this doesn't happen again, I'd like to also get this working for - swiftmodule inputs to the merge-module build phase - /output/ files for multithreading single-frontend builds (WMO) - object file inputs to the linker on OS X (response files for binutils ld have different quoting rules) Part 3 of https://bugs.swift.org/browse/SR-280.
19 lines
896 B
Swift
19 lines
896 B
Swift
// RUN: rm -rf %t && mkdir %t
|
|
|
|
// This limit was chosen because multi-threaded compilation broke here on OS X
|
|
// at one point.
|
|
// RUN: for i in {1..1100}; do echo "public func foo$i() {}" > %t/$i.swift; echo "CHECK: foo$i" >> %t/check.txt; done
|
|
|
|
// RUN: %target-build-swift -force-single-frontend-invocation -emit-library %t/*.swift -o %t/libWMO
|
|
// RUN: nm %t/libWMO | FileCheck %t/check.txt
|
|
|
|
// RUN: %target-build-swift -force-single-frontend-invocation -num-threads 1 -emit-library %t/*.swift -o %t/libWMOThreaded
|
|
// RUN: nm %t/libWMOThreaded | FileCheck %t/check.txt
|
|
|
|
// This is very slow due to process overhead. It's also doing one file at a time
|
|
// because we don't have a good way for lit tests to claim more than one thread.
|
|
// But it's still important to check.
|
|
// RUN: %target-build-swift -emit-library %t/*.swift -o %t/libMultiFile
|
|
// RUN: nm %t/libMultiFile | FileCheck %t/check.txt
|
|
|