|
11 | 11 | //===----------------------------------------------------------------------===//
|
12 | 12 |
|
13 | 13 | import class Foundation.NSLock
|
| 14 | +import struct Foundation.UUID |
14 | 15 |
|
15 | 16 | import func TSCBasic.withTemporaryDirectory
|
16 | 17 | import protocol TSCBasic.FileSystem
|
@@ -189,14 +190,13 @@ public final class ArgsResolver {
|
189 | 190 | (job.supportsResponseFiles && !commandLineFitsWithinSystemLimits(path: resolvedArguments[0], args: resolvedArguments)) {
|
190 | 191 | assert(!forceResponseFiles || job.supportsResponseFiles,
|
191 | 192 | "Platform does not support response files for job: \(job)")
|
192 |
| - // Match the integrated driver's behavior, which uses response file names of the form "arguments-[0-9a-zA-Z].resp". |
193 |
| - let hash = SHA256().hash(resolvedArguments.joined(separator: " ")).hexadecimalRepresentation |
194 |
| - let responseFilePath = temporaryDirectory.appending(component: "arguments-\(hash).resp") |
| 193 | + let uuid = UUID().uuidString |
| 194 | + let responseFilePath = temporaryDirectory.appending(component: "arguments-\(uuid).resp") |
195 | 195 |
|
196 | 196 | // FIXME: Need a way to support this for distributed build systems...
|
197 | 197 | if let absPath = responseFilePath.absolutePath {
|
198 | 198 | let argumentBytes = ByteString(resolvedArguments[2...].map { $0.spm_shellEscaped() }.joined(separator: "\n").utf8)
|
199 |
| - try fileSystem.writeFileContents(absPath, bytes: argumentBytes, atomically: true) |
| 199 | + try fileSystem.writeFileContents(absPath, bytes: argumentBytes) |
200 | 200 | resolvedArguments = [resolvedArguments[0], resolvedArguments[1], "@\(absPath.pathString)"]
|
201 | 201 | }
|
202 | 202 |
|
|
0 commit comments