From dccd3229952186f71dd83889f0ff7ee00343fcaa Mon Sep 17 00:00:00 2001 From: Artem Chikin Date: Wed, 5 Nov 2025 09:44:00 -0800 Subject: [PATCH 1/4] Unacceptable language check fixes --- Sources/SwiftDriver/Driver/Driver.swift | 2 +- .../SwiftDriver/Driver/OutputFileMap.swift | 6 +-- .../SwiftDriver/Execution/ProcessSet.swift | 42 ++++++++-------- ...crementalCompilationState+Extensions.swift | 2 +- Sources/swift-driver/main.swift | 4 +- .../IncrementalBuildPerformanceTests.swift | 2 +- .../IncrementalCompilationTests.swift | 10 ++-- Tests/SwiftDriverTests/SwiftDriverTests.swift | 50 +++++++++---------- .../TestUtilities/OutputFileMapCreator.swift | 4 +- 9 files changed, 61 insertions(+), 61 deletions(-) diff --git a/Sources/SwiftDriver/Driver/Driver.swift b/Sources/SwiftDriver/Driver/Driver.swift index d1ca03862..0703e8324 100644 --- a/Sources/SwiftDriver/Driver/Driver.swift +++ b/Sources/SwiftDriver/Driver/Driver.swift @@ -3870,7 +3870,7 @@ extension Driver { } // If an explicit path is not provided by the output file map, attempt to - // synthesize a path from the master swift dependency path. This is + // synthesize a path from the main swift dependency path. This is // important as we may otherwise emit this file at the location where the // driver was invoked, which is normally the root of the package. if let path = try outputFileMap?.existingOutputForSingleInput(outputType: .swiftDeps) { diff --git a/Sources/SwiftDriver/Driver/OutputFileMap.swift b/Sources/SwiftDriver/Driver/OutputFileMap.swift index a6863d424..2d7ed445d 100644 --- a/Sources/SwiftDriver/Driver/OutputFileMap.swift +++ b/Sources/SwiftDriver/Driver/OutputFileMap.swift @@ -262,9 +262,9 @@ fileprivate struct OutputFileMapJSON: Codable { _ entries: [VirtualPath.Handle : [FileType : VirtualPath.Handle]] ) -> Self { func convert(entry: (key: VirtualPath.Handle, value: [FileType: VirtualPath.Handle])) -> (String, Entry) { - // We use a VirtualPath with an empty path for the master entry, but its name is "." and we need "" - let fixedIfMaster = VirtualPath.lookup(entry.key).name == "." ? "" : VirtualPath.lookup(entry.key).name - return (fixedIfMaster, convert(outputs: entry.value)) + // We use a VirtualPath with an empty path for the main entry, but its name is "." and we need "" + let fixedIfMain = VirtualPath.lookup(entry.key).name == "." ? "" : VirtualPath.lookup(entry.key).name + return (fixedIfMain, convert(outputs: entry.value)) } func convert(outputs: [FileType: VirtualPath.Handle]) -> Entry { Entry(paths: outputs.mapValues({ VirtualPath.lookup($0).name })) diff --git a/Sources/SwiftDriver/Execution/ProcessSet.swift b/Sources/SwiftDriver/Execution/ProcessSet.swift index f8767b252..e7ef8d411 100644 --- a/Sources/SwiftDriver/Execution/ProcessSet.swift +++ b/Sources/SwiftDriver/Execution/ProcessSet.swift @@ -37,18 +37,18 @@ public final class ProcessSet { /// If the process group was asked to cancel all active processes. private var cancelled = false - /// The timeout (in seconds) after which the processes should be killed if they don't respond to SIGINT. - public let killTimeout: Double + /// The timeout (in seconds) after which the processes should be terminated if they don't respond to SIGINT. + public let terminateTimeout: Double - /// Condition to block kill thread until timeout. - private var killingCondition = Condition() + /// Condition to block termination thread until timeout. + private var terminationCondition = Condition() - /// Boolean predicate for killing condition. - private var shouldKill = false + /// Boolean predicate for termination condition. + private var shouldTerminate = false /// Create a process set. - public init(killTimeout: Double = 5) { - self.killTimeout = killTimeout + public init(terminateTimeout: Double = 5) { + self.terminateTimeout = terminateTimeout } /// Add a process to the process set. This method will throw if the process set is terminated using the terminate() @@ -80,22 +80,22 @@ public final class ProcessSet { // Interrupt all processes. signalAll(SIGINT) - // Create a thread that will kill all processes after a timeout. + // Create a thread that will terminate all processes after a timeout. let thread = TSCBasic.Thread { // Compute the timeout date. - let timeout = Date() + self.killTimeout + let timeout = Date() + self.terminateTimeout // Block until we timeout or notification. - self.killingCondition.whileLocked { - while !self.shouldKill { + self.terminationCondition.whileLocked { + while !self.shouldTerminate { // Block until timeout expires. - let timeLimitReached = !self.killingCondition.wait(until: timeout) - // Set should kill to true if time limit was reached. + let timeLimitReached = !self.terminationCondition.wait(until: timeout) + // Set shouldTerminate to true if time limit was reached. if timeLimitReached { - self.shouldKill = true + self.shouldTerminate = true } } } - // Send kill signal to all processes. + // Send terminate signal to all processes. #if os(Windows) self.signalAll(SIGTERM) #else @@ -105,17 +105,17 @@ public final class ProcessSet { thread.start() - // Wait until all processes terminate and notify the kill thread + // Wait until all processes terminate and notify the termination thread // if everyone exited to avoid waiting till timeout. for process in self.processes { _ = try? process.waitUntilExit() } - killingCondition.whileLocked { - shouldKill = true - killingCondition.signal() + terminationCondition.whileLocked { + shouldTerminate = true + terminationCondition.signal() } - // Join the kill thread so we don't exit before everything terminates. + // Join the termination thread so we don't exit before everything terminates. thread.join() } diff --git a/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState+Extensions.swift b/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState+Extensions.swift index 4fcc340ac..60ff18615 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState+Extensions.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState+Extensions.swift @@ -113,7 +113,7 @@ extension Diagnostic.Message { static var warning_incremental_requires_build_record_entry: Diagnostic.Message { .warning( "ignoring -incremental; " + - "output file map has no master dependencies entry (\"\(FileType.swiftDeps)\" under \"\")" + "output file map has no main dependencies entry (\"\(FileType.swiftDeps)\" under \"\")" ) } diff --git a/Sources/swift-driver/main.swift b/Sources/swift-driver/main.swift index d34ee8115..c067cb1ce 100644 --- a/Sources/swift-driver/main.swift +++ b/Sources/swift-driver/main.swift @@ -50,9 +50,9 @@ func getExitCode(_ code: Int32) -> Int32 { TerminateProcess(GetCurrentProcess(), UINT(0xC0000000 | UINT(2))) #else signal(SIGINT, SIG_DFL) - kill(getpid(), SIGINT) + kill(getpid(), SIGINT) // ignore-unacceptable-language #endif - fatalError("Invalid state, could not kill process") + fatalError("Invalid state, could not terminate process") } return code } diff --git a/Tests/SwiftDriverTests/IncrementalBuildPerformanceTests.swift b/Tests/SwiftDriverTests/IncrementalBuildPerformanceTests.swift index d1811369a..1d70a06d6 100644 --- a/Tests/SwiftDriverTests/IncrementalBuildPerformanceTests.swift +++ b/Tests/SwiftDriverTests/IncrementalBuildPerformanceTests.swift @@ -110,7 +110,7 @@ class IncrementalBuildPerformanceTests: XCTestCase { return nil } let withoutExtension = fileName.prefix(upTo: suffixRange.lowerBound) - guard !withoutExtension.hasSuffix("-master") else { return nil } + guard !withoutExtension.hasSuffix("-main") else { return nil } return withoutExtension } .sorted() diff --git a/Tests/SwiftDriverTests/IncrementalCompilationTests.swift b/Tests/SwiftDriverTests/IncrementalCompilationTests.swift index e6d1a495c..b4c854e7d 100644 --- a/Tests/SwiftDriverTests/IncrementalCompilationTests.swift +++ b/Tests/SwiftDriverTests/IncrementalCompilationTests.swift @@ -43,11 +43,11 @@ final class IncrementalCompilationTests: XCTestCase { var derivedDataPath: AbsolutePath { tempDir.appending(component: "derivedData") } - var masterSwiftDepsPath: AbsolutePath { - derivedDataPath.appending(component: "\(module)-master.swiftdeps") + var mainSwiftDepsPath: AbsolutePath { + derivedDataPath.appending(component: "\(module)-main.swiftdeps") } var priorsPath: AbsolutePath { - derivedDataPath.appending(component: "\(module)-master.priors") + derivedDataPath.appending(component: "\(module)-main.priors") } var casPath: AbsolutePath { derivedDataPath.appending(component: "cas") @@ -56,7 +56,7 @@ final class IncrementalCompilationTests: XCTestCase { derivedDataPath.appending(component: "\(basename).swiftdeps") } var serializedDepScanCachePath: AbsolutePath { - derivedDataPath.appending(component: "\(module)-master.swiftmoduledeps") + derivedDataPath.appending(component: "\(module)-main.swiftmoduledeps") } fileprivate var autolinkIncrementalExpectedDiags: [Diagnostic.Message] { queuingExtractingAutolink(module) @@ -2028,7 +2028,7 @@ extension DiagVerifiable { "Incremental compilation: Disabling incremental build: different arguments were passed to the compiler" } @DiagsBuilder var missingMainDependencyEntry: [Diagnostic.Message] { - .warning("ignoring -incremental; output file map has no master dependencies entry (\"swift-dependencies\" under \"\")") + .warning("ignoring -incremental; output file map has no main dependencies entry (\"swift-dependencies\" under \"\")") } @DiagsBuilder var disablingIncremental: [Diagnostic.Message] { "Incremental compilation: Disabling incremental build: no build record path" diff --git a/Tests/SwiftDriverTests/SwiftDriverTests.swift b/Tests/SwiftDriverTests/SwiftDriverTests.swift index 57559f00d..12e7109cb 100644 --- a/Tests/SwiftDriverTests/SwiftDriverTests.swift +++ b/Tests/SwiftDriverTests/SwiftDriverTests.swift @@ -1197,8 +1197,8 @@ final class SwiftDriverTests: XCTestCase { let outputMapContents: ByteString = """ { "": { - "diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.dia", - "emit-module-diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.emit-module.dia" + "diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.dia", + "emit-module-diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.emit-module.dia" }, "foo.swift": { "diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/foo.dia" @@ -1216,7 +1216,7 @@ final class SwiftDriverTests: XCTestCase { XCTAssertEqual(plannedJobs[0].kind, .emitModule) XCTAssertEqual(plannedJobs[1].kind, .compile) XCTAssertEqual(plannedJobs[2].kind, .link) - try XCTAssertJobInvocationMatches(plannedJobs[0], .flag("-serialize-diagnostics-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.emit-module.dia")))) + try XCTAssertJobInvocationMatches(plannedJobs[0], .flag("-serialize-diagnostics-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.emit-module.dia")))) try XCTAssertJobInvocationMatches(plannedJobs[1], .flag("-serialize-diagnostics-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/foo.dia")))) } @@ -1230,8 +1230,8 @@ final class SwiftDriverTests: XCTestCase { XCTAssertEqual(plannedJobs[0].kind, .compile) XCTAssertEqual(plannedJobs[1].kind, .emitModule) XCTAssertEqual(plannedJobs[2].kind, .link) - try XCTAssertJobInvocationMatches(plannedJobs[0], .flag("-serialize-diagnostics-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.dia")))) - try XCTAssertJobInvocationMatches(plannedJobs[1], .flag("-serialize-diagnostics-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.emit-module.dia")))) + try XCTAssertJobInvocationMatches(plannedJobs[0], .flag("-serialize-diagnostics-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.dia")))) + try XCTAssertJobInvocationMatches(plannedJobs[1], .flag("-serialize-diagnostics-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.emit-module.dia")))) } } } @@ -1241,8 +1241,8 @@ final class SwiftDriverTests: XCTestCase { let outputMapContents: ByteString = """ { "": { - "dependencies": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.d", - "emit-module-dependencies": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.emit-module.d" + "dependencies": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.d", + "emit-module-dependencies": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.emit-module.d" }, "foo.swift": { "dependencies": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/foo.d" @@ -1260,7 +1260,7 @@ final class SwiftDriverTests: XCTestCase { XCTAssertEqual(plannedJobs[0].kind, .emitModule) XCTAssertEqual(plannedJobs[1].kind, .compile) XCTAssertEqual(plannedJobs[2].kind, .link) - try XCTAssertJobInvocationMatches(plannedJobs[0], .flag("-emit-dependencies-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.emit-module.d")))) + try XCTAssertJobInvocationMatches(plannedJobs[0], .flag("-emit-dependencies-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.emit-module.d")))) try XCTAssertJobInvocationMatches(plannedJobs[1], .flag("-emit-dependencies-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/foo.d")))) } @@ -1274,8 +1274,8 @@ final class SwiftDriverTests: XCTestCase { XCTAssertEqual(plannedJobs[0].kind, .compile) XCTAssertEqual(plannedJobs[1].kind, .emitModule) XCTAssertEqual(plannedJobs[2].kind, .link) - try XCTAssertJobInvocationMatches(plannedJobs[0], .flag("-emit-dependencies-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.d")))) - try XCTAssertJobInvocationMatches(plannedJobs[1], .flag("-emit-dependencies-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.emit-module.d")))) + try XCTAssertJobInvocationMatches(plannedJobs[0], .flag("-emit-dependencies-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.d")))) + try XCTAssertJobInvocationMatches(plannedJobs[1], .flag("-emit-dependencies-path"), .path(.absolute(.init(validating: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.emit-module.d")))) } } } @@ -1287,7 +1287,7 @@ final class SwiftDriverTests: XCTestCase { let contents = ByteString(""" { "": { - "swift-dependencies": "\(objroot.appending(components: "master.swiftdeps").nativePathString(escaped: true))" + "swift-dependencies": "\(objroot.appending(components: "main.swiftdeps").nativePathString(escaped: true))" }, "/tmp/foo/Sources/foo/foo.swift": { "dependencies": "\(objroot.appending(components: "foo.d").nativePathString(escaped: true))", @@ -1306,8 +1306,8 @@ final class SwiftDriverTests: XCTestCase { let object = try outputFileMap.getOutput(inputFile: VirtualPath.intern(path: "/tmp/foo/Sources/foo/foo.swift"), outputType: .object) XCTAssertEqual(VirtualPath.lookup(object).name, objroot.appending(components: "foo.swift.o").pathString) - let masterDeps = try outputFileMap.getOutput(inputFile: VirtualPath.intern(path: ""), outputType: .swiftDeps) - XCTAssertEqual(VirtualPath.lookup(masterDeps).name, objroot.appending(components: "master.swiftdeps").pathString) + let mainDeps = try outputFileMap.getOutput(inputFile: VirtualPath.intern(path: ""), outputType: .swiftDeps) + XCTAssertEqual(VirtualPath.lookup(mainDeps).name, objroot.appending(components: "main.swiftdeps").pathString) } } } @@ -1320,7 +1320,7 @@ final class SwiftDriverTests: XCTestCase { """ { "": { - "swift-dependencies": "\(objroot.appending(components: "master.swiftdeps").nativePathString(escaped: true))" + "swift-dependencies": "\(objroot.appending(components: "main.swiftdeps").nativePathString(escaped: true))" }, "/tmp/foo/Sources/foo/foo.swift": { "dependencies": "\(objroot.appending(components: "foo.d").nativePathString(escaped: true))", @@ -1351,7 +1351,7 @@ final class SwiftDriverTests: XCTestCase { """ { "": { - "swift-dependencies": "\(objroot.appending(components: "master.swiftdeps").nativePathString(escaped: true))" + "swift-dependencies": "\(objroot.appending(components: "main.swiftdeps").nativePathString(escaped: true))" }, "/tmp/foo/Sources/foo/foo.swift": { "dependencies": "\(objroot.appending(components: "foo.d").nativePathString(escaped: true))", @@ -1643,7 +1643,7 @@ final class SwiftDriverTests: XCTestCase { let outputMapContents: ByteString = """ { "": { - "const-values": "/tmp/foo.build/foo.master.swiftconstvalues" + "const-values": "/tmp/foo.build/foo.main.swiftconstvalues" }, "foo.swift": { "object": "/tmp/foo.build/foo.swift.o", @@ -1668,7 +1668,7 @@ final class SwiftDriverTests: XCTestCase { XCTAssertEqual(plannedJobs.count, 2) XCTAssertEqual(plannedJobs[0].kind, .compile) XCTAssertEqual(plannedJobs[0].outputs.first(where: { $0.type == .swiftConstValues })?.file, - .absolute(try .init(validating: "/tmp/foo.build/foo.master.swiftconstvalues"))) + .absolute(try .init(validating: "/tmp/foo.build/foo.main.swiftconstvalues"))) XCTAssertEqual(plannedJobs[1].kind, .link) } } @@ -1754,7 +1754,7 @@ final class SwiftDriverTests: XCTestCase { // Rather than writing VirtualPath(path:...) over and over again, make strings, then fix it let stringyEntries: [String: [FileType: String]] = [ - "": [.swiftDeps: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.swiftdeps"], + "": [.swiftDeps: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.swiftdeps"], "foo.swift" : [ .dependencies: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/foo.d", .object: "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/foo.swift.o", @@ -1783,7 +1783,7 @@ final class SwiftDriverTests: XCTestCase { // Create sample OutputFileMap: let stringyEntries: [String: [FileType: String]] = [ - "": [.swiftDeps: "foo.build/master.swiftdeps"], + "": [.swiftDeps: "foo.build/main.swiftdeps"], "foo.swift" : [ .dependencies: "foo.build/foo.d", .object: "foo.build/foo.swift.o", @@ -1795,7 +1795,7 @@ final class SwiftDriverTests: XCTestCase { let root = localFileSystem.currentWorkingDirectory!.appending(components: "foo_root") let resolvedStringyEntries: [String: [FileType: String]] = [ - "": [.swiftDeps: root.appending(components: "foo.build", "master.swiftdeps").pathString], + "": [.swiftDeps: root.appending(components: "foo.build", "main.swiftdeps").pathString], root.appending(component: "foo.swift").pathString : [ .dependencies: root.appending(components: "foo.build", "foo.d").pathString, .object: root.appending(components: "foo.build", "foo.swift.o").pathString, @@ -1833,7 +1833,7 @@ final class SwiftDriverTests: XCTestCase { """ { "": { - "swift-dependencies": "build/master.swiftdeps" + "swift-dependencies": "build/main.swiftdeps" }, "main.swift": { "object": "build/main.o", @@ -7571,8 +7571,8 @@ final class SwiftDriverTests: XCTestCase { let outputMapContents: ByteString = """ { "": { - "diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.dia", - "emit-module-diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.emit-module.dia" + "diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.dia", + "emit-module-diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.emit-module.dia" }, "foo.swift": { "object": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/foo.o" @@ -7596,8 +7596,8 @@ final class SwiftDriverTests: XCTestCase { let outputMapContents: ByteString = .init(encodingAsUTF8: """ { "": { - "diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.dia", - "emit-module-diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/master.emit-module.dia" + "diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.dia", + "emit-module-diagnostics": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/main.emit-module.dia" }, "\(try AbsolutePath(validating: "/some/workingdir/foo.swift").nativePathString(escaped: true))": { "object": "/tmp/foo/.build/x86_64-apple-macosx/debug/foo.build/foo.o" diff --git a/Tests/TestUtilities/OutputFileMapCreator.swift b/Tests/TestUtilities/OutputFileMapCreator.swift index 2dbc4bbe5..ecb1b4df2 100644 --- a/Tests/TestUtilities/OutputFileMapCreator.swift +++ b/Tests/TestUtilities/OutputFileMapCreator.swift @@ -38,8 +38,8 @@ public struct OutputFileMapCreator { } private func generateDict() -> [String: [String: String]] { - let master = ["swift-dependencies": derivedData.appending(component: "\(module)-master.swiftdeps").nativePathString(escaped: false)] - let mainEntryDict = self.excludeMainEntry ? [:] : ["": master] + let main = ["swift-dependencies": derivedData.appending(component: "\(module)-main.swiftdeps").nativePathString(escaped: false)] + let mainEntryDict = self.excludeMainEntry ? [:] : ["": main] func baseNameEntry(_ s: AbsolutePath) -> [String: String] { [ "dependencies": ".d", From 2e781eb04c34e2c6d2512bc87a0b4e468ae075c4 Mon Sep 17 00:00:00 2001 From: Artem Chikin Date: Wed, 5 Nov 2025 09:51:56 -0800 Subject: [PATCH 2/4] Format test input YAML files --- TestInputs/Incremental/hello.swiftdeps.yaml | 715 ++++++++++---------- TestInputs/Incremental/main.swiftdeps.yaml | 47 +- 2 files changed, 395 insertions(+), 367 deletions(-) diff --git a/TestInputs/Incremental/hello.swiftdeps.yaml b/TestInputs/Incremental/hello.swiftdeps.yaml index 9f8ff839c..7ccd65c7c 100644 --- a/TestInputs/Incremental/hello.swiftdeps.yaml +++ b/TestInputs/Incremental/hello.swiftdeps.yaml @@ -2,346 +2,375 @@ --- allNodes: - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: '/Users/owenvoorhees/Desktop/hello.swiftdeps' - fingerprint: 38b457b424090ac2e595be0e5f7e3b5b - sequenceNumber: 0 - defsIDependUpon: [ 37, 38 ] - isProvides: true - - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: '/Users/owenvoorhees/Desktop/hello.swiftdeps' - fingerprint: 38b457b424090ac2e595be0e5f7e3b5b - sequenceNumber: 1 - defsIDependUpon: [ 2, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 4, 32, 33, 34, 35, 36, 8, 6, 39, 40 ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: A - fingerprint: b83bbc0b4b0432dbfabff6556a3a901f - sequenceNumber: 2 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: A - fingerprint: b83bbc0b4b0432dbfabff6556a3a901f - sequenceNumber: 3 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: topLevel - aspect: interface - context: '' - name: B - fingerprint: a62b4de199ab78fb0835377a93743e55 - sequenceNumber: 4 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: topLevel - aspect: implementation - context: '' - name: B - fingerprint: a62b4de199ab78fb0835377a93743e55 - sequenceNumber: 5 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 5hello1AC - name: '' - fingerprint: b83bbc0b4b0432dbfabff6556a3a901f - sequenceNumber: 6 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 5hello1AC - name: '' - fingerprint: b83bbc0b4b0432dbfabff6556a3a901f - sequenceNumber: 7 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: nominal - aspect: interface - context: 5hello1BV - name: '' - fingerprint: a62b4de199ab78fb0835377a93743e55 - sequenceNumber: 8 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: nominal - aspect: implementation - context: 5hello1BV - name: '' - fingerprint: a62b4de199ab78fb0835377a93743e55 - sequenceNumber: 9 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: potentialMember - aspect: interface - context: 5hello1AC - name: '' - fingerprint: b83bbc0b4b0432dbfabff6556a3a901f - sequenceNumber: 10 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: potentialMember - aspect: implementation - context: 5hello1AC - name: '' - fingerprint: b83bbc0b4b0432dbfabff6556a3a901f - sequenceNumber: 11 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: potentialMember - aspect: interface - context: 5hello1BV - name: '' - fingerprint: a62b4de199ab78fb0835377a93743e55 - sequenceNumber: 12 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: potentialMember - aspect: implementation - context: 5hello1BV - name: '' - fingerprint: a62b4de199ab78fb0835377a93743e55 - sequenceNumber: 13 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: dynamicLookup - aspect: interface - context: '' - name: y - sequenceNumber: 14 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: dynamicLookup - aspect: implementation - context: '' - name: y - sequenceNumber: 15 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: dynamicLookup - aspect: interface - context: '' - name: x - sequenceNumber: 16 - defsIDependUpon: [ 0 ] - isProvides: true - - key: - kind: dynamicLookup - aspect: implementation - context: '' - name: x - sequenceNumber: 17 - defsIDependUpon: [ ] - isProvides: true - - key: - kind: member - aspect: interface - context: 5hello1BV - name: y - sequenceNumber: 18 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: IntegerLiteralType - sequenceNumber: 19 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 5hello1AC - name: x - sequenceNumber: 20 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: s35_ExpressibleByBuiltinIntegerLiteralP - name: init - sequenceNumber: 21 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: Bool - sequenceNumber: 22 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 5hello1AC - name: Int - sequenceNumber: 23 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 5hello1AC - name: deinit - sequenceNumber: 24 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 5hello1BV - name: init - sequenceNumber: 25 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 5hello1AC - name: Bool - sequenceNumber: 26 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: Int - sequenceNumber: 27 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: String - sequenceNumber: 28 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 5hello1BV - name: x - sequenceNumber: 29 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 5hello1AC - name: init - sequenceNumber: 30 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: s35_ExpressibleByBuiltinBooleanLiteralP - name: init - sequenceNumber: 31 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 5hello1BV - name: doStuff - sequenceNumber: 32 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 5hello1BV - name: String - sequenceNumber: 33 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: member - aspect: interface - context: 5hello1AC - name: y - sequenceNumber: 34 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: BooleanLiteralType - sequenceNumber: 35 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: topLevel - aspect: interface - context: '' - name: FloatLiteralType - sequenceNumber: 36 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: externalDepend - aspect: interface - context: '' - name: '/Users/owenvoorhees/Documents/Development/swift-source/build/Ninja-ReleaseAssert/swift-macosx-x86_64/lib/swift/macosx/Swift.swiftmodule/x86_64-apple-macos.swiftmodule' - sequenceNumber: 37 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: externalDepend - aspect: interface - context: '' - name: '/Users/owenvoorhees/Documents/Development/swift-source/build/Ninja-ReleaseAssert/swift-macosx-x86_64/lib/swift/macosx/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule' - sequenceNumber: 38 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: nominal - aspect: interface - context: s35_ExpressibleByBuiltinIntegerLiteralP - name: '' - sequenceNumber: 39 - defsIDependUpon: [ ] - isProvides: false - - key: - kind: nominal - aspect: interface - context: s35_ExpressibleByBuiltinBooleanLiteralP - name: '' - sequenceNumber: 40 - defsIDependUpon: [ ] - isProvides: false -... + kind: sourceFileProvide + aspect: interface + context: "" + name: "/Users/owenvoorhees/Desktop/hello.swiftdeps" + fingerprint: 38b457b424090ac2e595be0e5f7e3b5b + sequenceNumber: 0 + defsIDependUpon: [37, 38] + isProvides: true + - key: + kind: sourceFileProvide + aspect: implementation + context: "" + name: "/Users/owenvoorhees/Desktop/hello.swiftdeps" + fingerprint: 38b457b424090ac2e595be0e5f7e3b5b + sequenceNumber: 1 + defsIDependUpon: + [ + 2, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 4, + 32, + 33, + 34, + 35, + 36, + 8, + 6, + 39, + 40, + ] + isProvides: true + - key: + kind: topLevel + aspect: interface + context: "" + name: A + fingerprint: b83bbc0b4b0432dbfabff6556a3a901f + sequenceNumber: 2 + defsIDependUpon: [0] + isProvides: true + - key: + kind: topLevel + aspect: implementation + context: "" + name: A + fingerprint: b83bbc0b4b0432dbfabff6556a3a901f + sequenceNumber: 3 + defsIDependUpon: [] + isProvides: true + - key: + kind: topLevel + aspect: interface + context: "" + name: B + fingerprint: a62b4de199ab78fb0835377a93743e55 + sequenceNumber: 4 + defsIDependUpon: [0] + isProvides: true + - key: + kind: topLevel + aspect: implementation + context: "" + name: B + fingerprint: a62b4de199ab78fb0835377a93743e55 + sequenceNumber: 5 + defsIDependUpon: [] + isProvides: true + - key: + kind: nominal + aspect: interface + context: 5hello1AC + name: "" + fingerprint: b83bbc0b4b0432dbfabff6556a3a901f + sequenceNumber: 6 + defsIDependUpon: [0] + isProvides: true + - key: + kind: nominal + aspect: implementation + context: 5hello1AC + name: "" + fingerprint: b83bbc0b4b0432dbfabff6556a3a901f + sequenceNumber: 7 + defsIDependUpon: [] + isProvides: true + - key: + kind: nominal + aspect: interface + context: 5hello1BV + name: "" + fingerprint: a62b4de199ab78fb0835377a93743e55 + sequenceNumber: 8 + defsIDependUpon: [0] + isProvides: true + - key: + kind: nominal + aspect: implementation + context: 5hello1BV + name: "" + fingerprint: a62b4de199ab78fb0835377a93743e55 + sequenceNumber: 9 + defsIDependUpon: [] + isProvides: true + - key: + kind: potentialMember + aspect: interface + context: 5hello1AC + name: "" + fingerprint: b83bbc0b4b0432dbfabff6556a3a901f + sequenceNumber: 10 + defsIDependUpon: [0] + isProvides: true + - key: + kind: potentialMember + aspect: implementation + context: 5hello1AC + name: "" + fingerprint: b83bbc0b4b0432dbfabff6556a3a901f + sequenceNumber: 11 + defsIDependUpon: [] + isProvides: true + - key: + kind: potentialMember + aspect: interface + context: 5hello1BV + name: "" + fingerprint: a62b4de199ab78fb0835377a93743e55 + sequenceNumber: 12 + defsIDependUpon: [0] + isProvides: true + - key: + kind: potentialMember + aspect: implementation + context: 5hello1BV + name: "" + fingerprint: a62b4de199ab78fb0835377a93743e55 + sequenceNumber: 13 + defsIDependUpon: [] + isProvides: true + - key: + kind: dynamicLookup + aspect: interface + context: "" + name: y + sequenceNumber: 14 + defsIDependUpon: [0] + isProvides: true + - key: + kind: dynamicLookup + aspect: implementation + context: "" + name: y + sequenceNumber: 15 + defsIDependUpon: [] + isProvides: true + - key: + kind: dynamicLookup + aspect: interface + context: "" + name: x + sequenceNumber: 16 + defsIDependUpon: [0] + isProvides: true + - key: + kind: dynamicLookup + aspect: implementation + context: "" + name: x + sequenceNumber: 17 + defsIDependUpon: [] + isProvides: true + - key: + kind: member + aspect: interface + context: 5hello1BV + name: y + sequenceNumber: 18 + defsIDependUpon: [] + isProvides: false + - key: + kind: topLevel + aspect: interface + context: "" + name: IntegerLiteralType + sequenceNumber: 19 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: 5hello1AC + name: x + sequenceNumber: 20 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: s35_ExpressibleByBuiltinIntegerLiteralP + name: init + sequenceNumber: 21 + defsIDependUpon: [] + isProvides: false + - key: + kind: topLevel + aspect: interface + context: "" + name: Bool + sequenceNumber: 22 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: 5hello1AC + name: Int + sequenceNumber: 23 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: 5hello1AC + name: deinit + sequenceNumber: 24 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: 5hello1BV + name: init + sequenceNumber: 25 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: 5hello1AC + name: Bool + sequenceNumber: 26 + defsIDependUpon: [] + isProvides: false + - key: + kind: topLevel + aspect: interface + context: "" + name: Int + sequenceNumber: 27 + defsIDependUpon: [] + isProvides: false + - key: + kind: topLevel + aspect: interface + context: "" + name: String + sequenceNumber: 28 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: 5hello1BV + name: x + sequenceNumber: 29 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: 5hello1AC + name: init + sequenceNumber: 30 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: s35_ExpressibleByBuiltinBooleanLiteralP + name: init + sequenceNumber: 31 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: 5hello1BV + name: doStuff + sequenceNumber: 32 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: 5hello1BV + name: String + sequenceNumber: 33 + defsIDependUpon: [] + isProvides: false + - key: + kind: member + aspect: interface + context: 5hello1AC + name: y + sequenceNumber: 34 + defsIDependUpon: [] + isProvides: false + - key: + kind: topLevel + aspect: interface + context: "" + name: BooleanLiteralType + sequenceNumber: 35 + defsIDependUpon: [] + isProvides: false + - key: + kind: topLevel + aspect: interface + context: "" + name: FloatLiteralType + sequenceNumber: 36 + defsIDependUpon: [] + isProvides: false + - key: + kind: externalDepend + aspect: interface + context: "" + name: "/Users/owenvoorhees/Documents/Development/swift-source/build/\ + Ninja-ReleaseAssert/swift-macosx-x86_64/lib/swift/macosx/\ + Swift.swiftmodule/x86_64-apple-macos.swiftmodule" + sequenceNumber: 37 + defsIDependUpon: [] + isProvides: false + - key: + kind: externalDepend + aspect: interface + context: "" + name: "/Users/owenvoorhees/Documents/Development/swift-source/build/\ + Ninja-ReleaseAssert/swift-macosx-x86_64/lib/swift/macosx/\ + SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule" + sequenceNumber: 38 + defsIDependUpon: [] + isProvides: false + - key: + kind: nominal + aspect: interface + context: s35_ExpressibleByBuiltinIntegerLiteralP + name: "" + sequenceNumber: 39 + defsIDependUpon: [] + isProvides: false + - key: + kind: nominal + aspect: interface + context: s35_ExpressibleByBuiltinBooleanLiteralP + name: "" + sequenceNumber: 40 + defsIDependUpon: [] + isProvides: false diff --git a/TestInputs/Incremental/main.swiftdeps.yaml b/TestInputs/Incremental/main.swiftdeps.yaml index a9561fcf7..280bac7e8 100644 --- a/TestInputs/Incremental/main.swiftdeps.yaml +++ b/TestInputs/Incremental/main.swiftdeps.yaml @@ -2,29 +2,28 @@ --- allNodes: - key: - kind: sourceFileProvide - aspect: interface - context: '' - name: main.swiftdeps - fingerprint: ec443bb982c3a06a433bdd47b85eeba2 - sequenceNumber: 0 - defsIDependUpon: [ 2 ] - isProvides: true + kind: sourceFileProvide + aspect: interface + context: "" + name: main.swiftdeps + fingerprint: ec443bb982c3a06a433bdd47b85eeba2 + sequenceNumber: 0 + defsIDependUpon: [2] + isProvides: true - key: - kind: sourceFileProvide - aspect: implementation - context: '' - name: main.swiftdeps - fingerprint: ec443bb982c3a06a433bdd47b85eeba2 - sequenceNumber: 1 - defsIDependUpon: [ ] - isProvides: true + kind: sourceFileProvide + aspect: implementation + context: "" + name: main.swiftdeps + fingerprint: ec443bb982c3a06a433bdd47b85eeba2 + sequenceNumber: 1 + defsIDependUpon: [] + isProvides: true - key: - kind: topLevel - aspect: interface - context: '' - name: a - sequenceNumber: 2 - defsIDependUpon: [ ] - isProvides: false -... + kind: topLevel + aspect: interface + context: "" + name: a + sequenceNumber: 2 + defsIDependUpon: [] + isProvides: false From 4805fb789efaeb783015c7e6a26fdb96edb0b97b Mon Sep 17 00:00:00 2001 From: Artem Chikin Date: Wed, 5 Nov 2025 10:02:55 -0800 Subject: [PATCH 3/4] Format the 'build-script-helper.py' script --- Utilities/build-script-helper.py | 1606 +++++++++++++++++++----------- 1 file changed, 1025 insertions(+), 581 deletions(-) diff --git a/Utilities/build-script-helper.py b/Utilities/build-script-helper.py index ee1610008..c4621de46 100755 --- a/Utilities/build-script-helper.py +++ b/Utilities/build-script-helper.py @@ -1,31 +1,45 @@ #!/usr/bin/env python3 import argparse -import os import json +import os import platform import shutil +import errno import subprocess import sys -import errno -if platform.system() == 'Darwin': - shared_lib_ext = '.dylib' +if platform.system() == "Darwin": + shared_lib_ext = ".dylib" else: - shared_lib_ext = '.so' -static_lib_ext = '.a' -macos_deployment_target = '10.15' + shared_lib_ext = ".so" +static_lib_ext = ".a" +macos_deployment_target = "10.15" + def error(message): print("--- %s: error: %s" % (os.path.basename(sys.argv[0]), message)) sys.stdout.flush() raise SystemExit(1) + # Tools constructed as a part of the a development build toolchain -driver_toolchain_tools = ['swift', 'swift-frontend', 'clang', 'swift-help', - 'swift-autolink-extract', 'lldb', 'swift-api-digester'] +driver_toolchain_tools = [ + "swift", + "swift-frontend", + "clang", + "swift-help", + "swift-autolink-extract", + "lldb", + "swift-api-digester", +] + +executables_to_install = [ + "swift-driver", + "swift-help", + "swift-build-sdk-interfaces", +] -executables_to_install = ['swift-driver', 'swift-help', 'swift-build-sdk-interfaces'] def mkdir_p(path): """Create the given directory, if it does not exist.""" @@ -36,634 +50,1064 @@ def mkdir_p(path): if e.errno != errno.EEXIST: raise + def call_output(cmd, cwd=None, stderr=False, verbose=False): """Calls a subprocess for its return data.""" if verbose: - print(' '.join(cmd)) + print(" ".join(cmd)) try: - return subprocess.check_output(cmd, cwd=cwd, stderr=stderr, universal_newlines=True).strip() + return subprocess.check_output( + cmd, cwd=cwd, stderr=stderr, universal_newlines=True + ).strip() except Exception as e: if not verbose: - print(' '.join(cmd)) + print(" ".join(cmd)) error(str(e)) + def get_dispatch_cmake_arg(args): - """Returns the CMake argument to the Dispatch configuration to use for building SwiftPM.""" - dispatch_dir = os.path.join(args.dispatch_build_dir, 'cmake/modules') - return '-Ddispatch_DIR=' + dispatch_dir + """ + Returns the CMake argument to the Dispatch configuration to use + for building SwiftPM. + """ + dispatch_dir = os.path.join(args.dispatch_build_dir, "cmake/modules") + return "-Ddispatch_DIR=" + dispatch_dir + def get_foundation_cmake_arg(args): - """Returns the CMake argument to the Foundation configuration to use for building SwiftPM.""" - foundation_dir = os.path.join(args.foundation_build_dir, 'cmake/modules') - return '-DFoundation_DIR=' + foundation_dir + """ + Returns the CMake argument to the Foundation configuration to use for + building SwiftPM. + """ + foundation_dir = os.path.join(args.foundation_build_dir, "cmake/modules") + return "-DFoundation_DIR=" + foundation_dir + def swiftpm(action, swift_exec, swiftpm_args, env=None): - cmd = [swift_exec, action] + swiftpm_args - print(' '.join(cmd)) - subprocess.check_call(cmd, env=env) + cmd = [swift_exec, action] + swiftpm_args + print(" ".join(cmd)) + subprocess.check_call(cmd, env=env) + def swiftpm_bin_path(swift_exec, swiftpm_args, env=None): - swiftpm_args = [arg for arg in swiftpm_args if arg != '-v' and arg != '--verbose'] - cmd = [swift_exec, 'build', '--show-bin-path'] + swiftpm_args - print(' '.join(cmd)) - return subprocess.check_output(cmd, env=env, encoding='utf-8').strip() + swiftpm_args = [ + arg for arg in swiftpm_args if arg != "-v" and arg != "--verbose" + ] + cmd = [swift_exec, "build", "--show-bin-path"] + swiftpm_args + print(" ".join(cmd)) + return subprocess.check_output(cmd, env=env, encoding="utf-8").strip() + def get_swiftpm_options(args): - swiftpm_args = [ - '--package-path', args.package_path, - '--scratch-path', args.build_path, - '--configuration', args.configuration, - ] - - if args.verbose: - swiftpm_args += ['--verbose'] - - build_os = args.build_target.split('-')[2] - if build_os.startswith('macosx'): - swiftpm_args += [ - # Relative library rpath for swift; will only be used when /usr/lib/swift - # is not available. - '-Xlinker', '-rpath', '-Xlinker', '@executable_path/../lib/swift/macosx', - ] - else: - swiftpm_args += [ - # Dispatch headers - '-Xcxx', '-I', '-Xcxx', - os.path.join(args.toolchain, 'lib', 'swift'), - # For - '-Xcxx', '-I', '-Xcxx', - os.path.join(args.toolchain, 'lib', 'swift', 'Block'), + swiftpm_args = [ + "--package-path", + args.package_path, + "--scratch-path", + args.build_path, + "--configuration", + args.configuration, ] - if args.cross_compile_hosts: - swiftpm_args += ['--destination', args.cross_compile_config] - - if args.action == 'install': - swiftpm_args += ['--disable-local-rpath'] - - if '-android' in args.build_target: - swiftpm_args += [ - '-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android', - ] - elif '-freebsd' in args.build_target: - # Library rpath for swift, dispatch, Foundation, etc. when installing - swiftpm_args += [ - '-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/freebsd', - ] + if args.verbose: + swiftpm_args += ["--verbose"] + + build_os = args.build_target.split("-")[2] + if build_os.startswith("macosx"): + swiftpm_args += [ + # Relative library rpath for swift; will only be used when + # /usr/lib/swift is not available. + "-Xlinker", + "-rpath", + "-Xlinker", + "@executable_path/../lib/swift/macosx", + ] else: - # Library rpath for swift, dispatch, Foundation, etc. when installing - swiftpm_args += [ - '-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/' + build_os, - ] - - if args.action == 'install': - swiftpm_args += ['-Xswiftc', '-no-toolchain-stdlib-rpath'] + swiftpm_args += [ + # Dispatch headers + "-Xcxx", + "-I", + "-Xcxx", + os.path.join(args.toolchain, "lib", "swift"), + # For + "-Xcxx", + "-I", + "-Xcxx", + os.path.join(args.toolchain, "lib", "swift", "Block"), + ] + + if args.cross_compile_hosts: + swiftpm_args += ["--destination", args.cross_compile_config] + + if args.action == "install": + swiftpm_args += ["--disable-local-rpath"] + + if "-android" in args.build_target: + swiftpm_args += [ + "-Xlinker", + "-rpath", + "-Xlinker", + "$ORIGIN/../lib/swift/android", + ] + elif "-freebsd" in args.build_target: + # Library rpath for swift, dispatch, Foundation, etc. + # when installing + swiftpm_args += [ + "-Xlinker", + "-rpath", + "-Xlinker", + "$ORIGIN/../lib/swift/freebsd", + ] + else: + # Library rpath for swift, dispatch, Foundation, etc. + # when installing + swiftpm_args += [ + "-Xlinker", + "-rpath", + "-Xlinker", + "$ORIGIN/../lib/swift/" + build_os, + ] + + if args.action == "install": + swiftpm_args += ["-Xswiftc", "-no-toolchain-stdlib-rpath"] + + return swiftpm_args - return swiftpm_args def install_binary(file, source_dir, install_dir, verbose): - print('Installing %s into: %s' % (file, install_dir)) - cmd = ['rsync', '-a', os.path.join(source_dir, file), install_dir] - if verbose: - print(' '.join(cmd)) - subprocess.check_call(cmd) + print("Installing %s into: %s" % (file, install_dir)) + cmd = ["rsync", "-a", os.path.join(source_dir, file), install_dir] + if verbose: + print(" ".join(cmd)) + subprocess.check_call(cmd) + def delete_rpath(rpath, binary, verbose): - cmd = ['install_name_tool', '-delete_rpath', rpath, binary] - if verbose: - print(' '.join(cmd)) - installToolProcess = subprocess.Popen(cmd, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - stdout, stderr = installToolProcess.communicate() - if installToolProcess.returncode != 0: - print('install_name_tool -delete_rpath command failed, assume incremental build and proceed.') - if verbose: - print(stdout) + cmd = ["install_name_tool", "-delete_rpath", rpath, binary] + if verbose: + print(" ".join(cmd)) + installToolProcess = subprocess.Popen( + cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE + ) + stdout, stderr = installToolProcess.communicate() + if installToolProcess.returncode != 0: + print( + "install_name_tool -delete_rpath command failed, " + "assume incremental build and proceed." + ) + if verbose: + print(stdout) + def add_rpath(rpath, binary, verbose): - cmd = ['install_name_tool', '-add_rpath', rpath, binary] - if verbose: - print(' '.join(cmd)) - installToolProcess = subprocess.Popen(cmd, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - stdout, stderr = installToolProcess.communicate() - if installToolProcess.returncode != 0: - print('install_name_tool -add_rpath command failed, assume incremental build and proceed.') - if verbose: - print(stdout) + cmd = ["install_name_tool", "-add_rpath", rpath, binary] + if verbose: + print(" ".join(cmd)) + installToolProcess = subprocess.Popen( + cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE + ) + stdout, stderr = installToolProcess.communicate() + if installToolProcess.returncode != 0: + print( + "install_name_tool -add_rpath command failed, " + "assume incremental build and proceed." + ) + if verbose: + print(stdout) + def should_test_parallel(): - return False + return False + def handle_invocation(args): - swiftpm_args = get_swiftpm_options(args) - toolchain_bin = os.path.join(args.toolchain, 'bin') - swift_exec = os.path.join(toolchain_bin, 'swift') - - # Platform-specific targets for which we must build swift-driver - if args.cross_compile_hosts: - targets = args.cross_compile_hosts - elif '-apple-macosx' in args.build_target: - targets = [args.build_target + macos_deployment_target] - else: - targets = [args.build_target] - - env = os.environ - # Use local dependencies (i.e. checked out next to swift-driver). - if not args.no_local_deps: - env['SWIFTCI_USE_LOCAL_DEPS'] = "1" - - if args.ninja_bin: - env['NINJA_BIN'] = args.ninja_bin - - if args.sysroot: - env['SDKROOT'] = args.sysroot - - env['SWIFT_EXEC'] = '%sc' % (swift_exec) - - if args.action == 'build': - if args.cross_compile_hosts and not '-macosx' in args.cross_compile_hosts[0]: - swiftpm('build', swift_exec, swiftpm_args, env) + swiftpm_args = get_swiftpm_options(args) + toolchain_bin = os.path.join(args.toolchain, "bin") + swift_exec = os.path.join(toolchain_bin, "swift") + + # Platform-specific targets for which we must build swift-driver + if args.cross_compile_hosts: + targets = args.cross_compile_hosts + elif "-apple-macosx" in args.build_target: + targets = [args.build_target + macos_deployment_target] else: - build_using_cmake(args, toolchain_bin, args.build_path, targets) - - elif args.action == 'clean': - print('Cleaning ' + args.build_path) - shutil.rmtree(args.build_path, ignore_errors=True) - elif args.action == 'test': - for tool in driver_toolchain_tools: - tool_path = os.path.join(toolchain_bin, tool) - if os.path.exists(tool_path): - env['SWIFT_DRIVER_' + tool.upper().replace('-','_') + '_EXEC'] = '%s' % (tool_path) - test_args = swiftpm_args - test_args += ['-Xswiftc', '-enable-testing'] - if should_test_parallel(): - test_args += ['--parallel'] - # The test suite consults these variables to control what tests get run - env['SWIFT_DRIVER_ENABLE_INTEGRATION_TESTS'] = "1" - if args.lit_test_dir: - env['SWIFT_DRIVER_LIT_DIR'] = args.lit_test_dir - swiftpm('test', swift_exec, test_args, env) - elif args.action == 'install': - if '-apple-macosx' in args.build_target: - build_using_cmake(args, toolchain_bin, args.build_path, targets) - install(args, args.build_path, targets) + targets = [args.build_target] + + env = os.environ + # Use local dependencies (i.e. checked out next to swift-driver). + if not args.no_local_deps: + env["SWIFTCI_USE_LOCAL_DEPS"] = "1" + + if args.ninja_bin: + env["NINJA_BIN"] = args.ninja_bin + + if args.sysroot: + env["SDKROOT"] = args.sysroot + + env["SWIFT_EXEC"] = "%sc" % (swift_exec) + + if args.action == "build": + if ( + args.cross_compile_hosts and + "-macosx" not in args.cross_compile_hosts[0] + ): + swiftpm("build", swift_exec, swiftpm_args, env) + else: + build_using_cmake(args, toolchain_bin, args.build_path, targets) + + elif args.action == "clean": + print("Cleaning " + args.build_path) + shutil.rmtree(args.build_path, ignore_errors=True) + elif args.action == "test": + for tool in driver_toolchain_tools: + tool_path = os.path.join(toolchain_bin, tool) + if os.path.exists(tool_path): + env[ + "SWIFT_DRIVER_" + tool.upper().replace("-", "_") + "_EXEC" + ] = "%s" % (tool_path) + test_args = swiftpm_args + test_args += ["-Xswiftc", "-enable-testing"] + if should_test_parallel(): + test_args += ["--parallel"] + # The test suite consults these variables to control what tests get run + env["SWIFT_DRIVER_ENABLE_INTEGRATION_TESTS"] = "1" + if args.lit_test_dir: + env["SWIFT_DRIVER_LIT_DIR"] = args.lit_test_dir + swiftpm("test", swift_exec, test_args, env) + elif args.action == "install": + if "-apple-macosx" in args.build_target: + build_using_cmake(args, toolchain_bin, args.build_path, targets) + install(args, args.build_path, targets) + else: + bin_path = swiftpm_bin_path(swift_exec, swiftpm_args, env) + swiftpm("build", swift_exec, swiftpm_args, env) + non_darwin_install(args, bin_path) else: - bin_path = swiftpm_bin_path(swift_exec, swiftpm_args, env) - swiftpm('build', swift_exec, swiftpm_args, env) - non_darwin_install(args, bin_path) - else: - assert False, 'unknown action \'{}\''.format(args.action) + assert False, "unknown action '{}'".format(args.action) -# Installation flow for non-darwin platforms, only copies over swift-driver and swift-help + +# Installation flow for non-darwin platforms, only copies over swift-driver +# and swift-help. # TODO: Unify CMake-based installation flow used on Darwin with this def non_darwin_install(args, swiftpm_bin_path): - for prefix in args.install_prefixes: - prefix_bin = os.path.join(prefix, 'bin') - for exe in executables_to_install: - install_binary(exe, swiftpm_bin_path, prefix_bin, args.verbose) + for prefix in args.install_prefixes: + prefix_bin = os.path.join(prefix, "bin") + for exe in executables_to_install: + install_binary(exe, swiftpm_bin_path, prefix_bin, args.verbose) + def install(args, build_dir, targets): - # Construct and install universal swift-driver, swift-help executables - # and libSwiftDriver, libSwiftOptions libraries, along with their dependencies. - for prefix in args.install_prefixes: - install_swiftdriver(args, build_dir, prefix, targets) - -def install_swiftdriver(args, build_dir, prefix, targets) : - install_bin = os.path.join(prefix, 'bin') - install_lib = os.path.join(prefix, 'lib', 'swift', 'macosx') - install_include = os.path.join(prefix, 'include', 'swift') - universal_dir = os.path.join(build_dir, 'universal-apple-macos%s' % macos_deployment_target) - bin_dir = os.path.join(universal_dir, 'bin') - lib_dir = os.path.join(universal_dir, 'lib') - mkdir_p(universal_dir) - mkdir_p(bin_dir) - mkdir_p(lib_dir) - - # swift-driver and swift-help - install_executables(args, build_dir, bin_dir, install_bin, targets) - - # libSwiftDriver and libSwiftDriverExecution and libSwiftOptions - install_libraries(args, build_dir, lib_dir, install_lib, targets) - - # Binary Swift Modules: - # swift-driver: SwiftDriver.swiftmodule, SwiftOptions.swiftmodule - # swift-tools-support-core: TSCUtility.swiftmodule, TSCBasic.swiftmodule - # swift-argument-parser: ArgumentParser.swiftmodule (disabled until needed) - install_binary_swift_modules(args, build_dir, install_lib, targets) - - # Modulemaps for C Modules: - # TSCclibc - install_c_module_includes(args, build_dir, install_include) - -# Install universal binaries for swift-driver and swift-help into the toolchain bin -# directory -def install_executables(args, build_dir, universal_bin_dir, toolchain_bin_dir, targets): - for exe in executables_to_install: - # Fixup rpaths - for target in targets: - exe_bin_path = os.path.join(build_dir, target, - args.configuration, 'bin', exe) - driver_lib_dir_path = os.path.join(build_dir, target, - args.configuration, 'lib') - delete_rpath(driver_lib_dir_path, exe_bin_path, args.verbose) - - for lib in ['swift-tools-support-core', 'swift-argument-parser']: - lib_dir_path = os.path.join(build_dir, target, - args.configuration, 'dependencies', - lib, 'lib') - delete_rpath(lib_dir_path, exe_bin_path, args.verbose) - - # Point to the installation toolchain's lib directory - add_rpath('@executable_path/../lib/swift/macosx', exe_bin_path, args.verbose) - - # Merge the multiple architecture binaries into a universal binary and install - output_bin_path = os.path.join(universal_bin_dir, exe) - lipo_cmd = ['lipo'] - # Inputs - for target in targets: - input_bin_path = os.path.join(build_dir, target, - args.configuration, 'bin', exe) - lipo_cmd.append(input_bin_path) - lipo_cmd.extend(['-create', '-output', output_bin_path]) - subprocess.check_call(lipo_cmd) - install_binary(exe, universal_bin_dir, toolchain_bin_dir, args.verbose) + # Construct and install universal swift-driver, swift-help executables + # and libSwiftDriver, libSwiftOptions libraries, along with their + # dependencies. + for prefix in args.install_prefixes: + install_swiftdriver(args, build_dir, prefix, targets) + + +def install_swiftdriver(args, build_dir, prefix, targets): + install_bin = os.path.join(prefix, "bin") + install_lib = os.path.join(prefix, "lib", "swift", "macosx") + install_include = os.path.join(prefix, "include", "swift") + universal_dir = os.path.join( + build_dir, "universal-apple-macos%s" % macos_deployment_target + ) + bin_dir = os.path.join(universal_dir, "bin") + lib_dir = os.path.join(universal_dir, "lib") + mkdir_p(universal_dir) + mkdir_p(bin_dir) + mkdir_p(lib_dir) + + # swift-driver and swift-help + install_executables(args, build_dir, bin_dir, install_bin, targets) + + # libSwiftDriver and libSwiftDriverExecution and libSwiftOptions + install_libraries(args, build_dir, lib_dir, install_lib, targets) + + # Binary Swift Modules: + # swift-driver: SwiftDriver.swiftmodule, SwiftOptions.swiftmodule + # swift-tools-support-core: TSCUtility.swiftmodule, TSCBasic.swiftmodule + # swift-argument-parser: ArgumentParser.swiftmodule (disabled until needed) + install_binary_swift_modules(args, build_dir, install_lib, targets) + + # Modulemaps for C Modules: + # TSCclibc + install_c_module_includes(args, build_dir, install_include) + + +# Install universal binaries for swift-driver and swift-help into the +# toolchain bin directory +def install_executables( + args, build_dir, universal_bin_dir, toolchain_bin_dir, targets +): + for exe in executables_to_install: + # Fixup rpaths + for target in targets: + exe_bin_path = os.path.join( + build_dir, target, args.configuration, "bin", exe + ) + driver_lib_dir_path = os.path.join( + build_dir, target, args.configuration, "lib" + ) + delete_rpath(driver_lib_dir_path, exe_bin_path, args.verbose) + + for lib in ["swift-tools-support-core", "swift-argument-parser"]: + lib_dir_path = os.path.join( + build_dir, + target, + args.configuration, + "dependencies", + lib, + "lib", + ) + delete_rpath(lib_dir_path, exe_bin_path, args.verbose) + + # Point to the installation toolchain's lib directory + add_rpath( + "@executable_path/../lib/swift/macosx", + exe_bin_path, + args.verbose, + ) + + # Merge the multiple architecture binaries into a universal binary + # and install + output_bin_path = os.path.join(universal_bin_dir, exe) + lipo_cmd = ["lipo"] + # Inputs + for target in targets: + input_bin_path = os.path.join( + build_dir, target, args.configuration, "bin", exe + ) + lipo_cmd.append(input_bin_path) + lipo_cmd.extend(["-create", "-output", output_bin_path]) + subprocess.check_call(lipo_cmd) + install_binary(exe, universal_bin_dir, toolchain_bin_dir, args.verbose) + + +# Install shared libraries for the driver and its dependencies into +# the toolchain +def install_libraries( + args, build_dir, universal_lib_dir, toolchain_lib_dir, targets +): + # Fixup the SwiftDriver rpath for libSwiftDriver and + # libSwiftDriverExecution + for lib in ["libSwiftDriver", "libSwiftDriverExecution"]: + for target in targets: + lib_path = os.path.join( + build_dir, + target, + args.configuration, + "lib", + lib + shared_lib_ext, + ) + driver_lib_dir_path = os.path.join( + build_dir, target, args.configuration, "lib" + ) + delete_rpath(driver_lib_dir_path, lib_path, args.verbose) + + # Fixup the TSC and llbuild rpaths + driver_libs = [ + os.path.join("lib", d) + for d in [ + "libSwiftDriver", + "libSwiftOptions", + "libSwiftDriverExecution", + ] + ] + tsc_libs = [ + os.path.join("dependencies", "swift-tools-support-core", "lib", d) + for d in ["libTSCBasic", "libTSCUtility"] + ] + for lib in driver_libs + tsc_libs: + for target in targets: + lib_path = os.path.join( + build_dir, target, args.configuration, lib + shared_lib_ext + ) + for dep in ["swift-tools-support-core", "llbuild"]: + lib_dir_path = os.path.join( + build_dir, + target, + args.configuration, + "dependencies", + dep, + "lib", + ) + delete_rpath(lib_dir_path, lib_path, args.verbose) + + # Install the libSwiftDriver and libSwiftOptions and + # libSwiftDriverExecution shared libraries into the toolchain lib + package_subpath = args.configuration + for lib in [ + "libSwiftDriver", + "libSwiftOptions", + "libSwiftDriverExecution", + ]: + install_library( + args, + build_dir, + package_subpath, + lib, + shared_lib_ext, + universal_lib_dir, + toolchain_lib_dir, + "swift-driver", + targets, + ) + + # Install the swift-tools-support core shared libraries into the + # toolchain lib + package_subpath = os.path.join( + args.configuration, "dependencies", "swift-tools-support-core" + ) + for lib in ["libTSCBasic", "libTSCUtility"]: + install_library( + args, + build_dir, + package_subpath, + lib, + shared_lib_ext, + universal_lib_dir, + toolchain_lib_dir, + "swift-tools-support-core", + targets, + ) + + # Install the swift-argument-parser shared libraries into the toolchain lib + package_subpath = os.path.join( + args.configuration, "dependencies", "swift-argument-parser" + ) + for lib, ext in [ + ("libArgumentParser", shared_lib_ext), + ("libArgumentParserToolInfo", static_lib_ext), + ]: + install_library( + args, + build_dir, + package_subpath, + lib, + ext, + universal_lib_dir, + toolchain_lib_dir, + "swift-argument-parser", + targets, + ) + + # Install the llbuild core shared libraries into the toolchain lib + package_subpath = os.path.join( + args.configuration, "dependencies", "llbuild" + ) + for lib in ["libllbuildSwift"]: + install_library( + args, + build_dir, + package_subpath, + lib, + shared_lib_ext, + universal_lib_dir, + toolchain_lib_dir, + "llbuild", + targets, + ) -# Install shared libraries for the driver and its dependencies into the toolchain -def install_libraries(args, build_dir, universal_lib_dir, toolchain_lib_dir, targets): - # Fixup the SwiftDriver rpath for libSwiftDriver and libSwiftDriverExecution - for lib in ['libSwiftDriver', 'libSwiftDriverExecution']: - for target in targets: - lib_path = os.path.join(build_dir, target, - args.configuration, 'lib', lib + shared_lib_ext) - driver_lib_dir_path = os.path.join(build_dir, target, - args.configuration, 'lib') - delete_rpath(driver_lib_dir_path, lib_path, args.verbose) - - # Fixup the TSC and llbuild rpaths - driver_libs = [os.path.join('lib', d) for d in ['libSwiftDriver', 'libSwiftOptions', 'libSwiftDriverExecution']] - tsc_libs = [os.path.join('dependencies', 'swift-tools-support-core', 'lib', d) for d in ['libTSCBasic', 'libTSCUtility']] - for lib in driver_libs + tsc_libs: - for target in targets: - lib_path = os.path.join(build_dir, target, - args.configuration, lib + shared_lib_ext) - for dep in ['swift-tools-support-core', 'llbuild']: - lib_dir_path = os.path.join(build_dir, target, - args.configuration, 'dependencies', - dep, 'lib') - delete_rpath(lib_dir_path, lib_path, args.verbose) - - # Install the libSwiftDriver and libSwiftOptions and libSwiftDriverExecution - # shared libraries into the toolchain lib - package_subpath = args.configuration - for lib in ['libSwiftDriver', 'libSwiftOptions', 'libSwiftDriverExecution']: - install_library(args, build_dir, package_subpath, lib, shared_lib_ext, - universal_lib_dir, toolchain_lib_dir, 'swift-driver', targets) - - # Install the swift-tools-support core shared libraries into the toolchain lib - package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-tools-support-core') - for lib in ['libTSCBasic', 'libTSCUtility']: - install_library(args, build_dir, package_subpath, lib, shared_lib_ext, - universal_lib_dir, toolchain_lib_dir, 'swift-tools-support-core', targets) - - # Install the swift-argument-parser shared libraries into the toolchain lib - package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-argument-parser') - for (lib, ext) in [('libArgumentParser', shared_lib_ext), ('libArgumentParserToolInfo', static_lib_ext)]: - install_library(args, build_dir, package_subpath, lib, ext, - universal_lib_dir, toolchain_lib_dir,'swift-argument-parser', targets) - - # Install the llbuild core shared libraries into the toolchain lib - package_subpath = os.path.join(args.configuration, 'dependencies', 'llbuild') - for lib in ['libllbuildSwift']: - install_library(args, build_dir, package_subpath, lib, shared_lib_ext, - universal_lib_dir, toolchain_lib_dir,'llbuild', targets) # Create a universal shared-library file and install it into the toolchain lib -def install_library(args, build_dir, package_subpath, lib_name, lib_ext, - universal_lib_dir, toolchain_lib_dir, package_name, targets): - lib_file = lib_name + lib_ext - output_dylib_path = os.path.join(universal_lib_dir, lib_file) - lipo_cmd = ['lipo'] - for target in targets: - input_lib_path = os.path.join(build_dir, target, - package_subpath, 'lib', lib_file) - lipo_cmd.append(input_lib_path) - lipo_cmd.extend(['-create', '-output', output_dylib_path]) - subprocess.check_call(lipo_cmd) - install_binary(lib_file, universal_lib_dir, toolchain_lib_dir, args.verbose) - -# Install binary .swiftmodule files for the driver and its dependencies into the toolchain lib -def install_binary_swift_modules(args, build_dir, toolchain_lib_dir, targets): - # The common subpath from a project's build directory to where its build products are found - product_subpath = 'swift' - - # swift-driver - package_subpath = os.path.join(args.configuration, product_subpath) - for module in ['SwiftDriver', 'SwiftOptions']: - install_module(args, build_dir, package_subpath, toolchain_lib_dir, module, targets) - - # swift-tools-support-core - package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-tools-support-core', - product_subpath) - for module in ['TSCUtility', 'TSCBasic']: - install_module(args, build_dir, package_subpath, toolchain_lib_dir, module, targets) - - # swift-argument-parser - package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-argument-parser', - product_subpath) - install_module(args, build_dir, package_subpath, toolchain_lib_dir, 'ArgumentParser', targets) +def install_library( + args, + build_dir, + package_subpath, + lib_name, + lib_ext, + universal_lib_dir, + toolchain_lib_dir, + package_name, + targets, +): + lib_file = lib_name + lib_ext + output_dylib_path = os.path.join(universal_lib_dir, lib_file) + lipo_cmd = ["lipo"] + for target in targets: + input_lib_path = os.path.join( + build_dir, target, package_subpath, "lib", lib_file + ) + lipo_cmd.append(input_lib_path) + lipo_cmd.extend(["-create", "-output", output_dylib_path]) + subprocess.check_call(lipo_cmd) + install_binary( + lib_file, universal_lib_dir, toolchain_lib_dir, args.verbose + ) -# Install the modulemaps and headers of the driver's C module dependencies into the toolchain -# include directory +# Install binary .swiftmodule files for the driver and its dependencies into +# the toolchain lib +def install_binary_swift_modules(args, build_dir, toolchain_lib_dir, targets): + # The common subpath from a project's build directory to where its build + # products are found + product_subpath = "swift" + + # swift-driver + package_subpath = os.path.join(args.configuration, product_subpath) + for module in ["SwiftDriver", "SwiftOptions"]: + install_module( + args, + build_dir, + package_subpath, + toolchain_lib_dir, + module, + targets, + ) + + # swift-tools-support-core + package_subpath = os.path.join( + args.configuration, + "dependencies", + "swift-tools-support-core", + product_subpath, + ) + for module in ["TSCUtility", "TSCBasic"]: + install_module( + args, + build_dir, + package_subpath, + toolchain_lib_dir, + module, + targets, + ) + + # swift-argument-parser + package_subpath = os.path.join( + args.configuration, + "dependencies", + "swift-argument-parser", + product_subpath, + ) + install_module( + args, + build_dir, + package_subpath, + toolchain_lib_dir, + "ArgumentParser", + targets, + ) + + +# Install the modulemaps and headers of the driver's C module dependencies +# into the toolchain include directory def install_c_module_includes(args, build_dir, toolchain_include_dir): - # TSCclibc C module's modulemap and header files - tscc_include_dir = os.path.join(os.path.dirname(args.package_path), 'swift-tools-support-core', 'Sources', - 'TSCclibc', 'include') - install_include_artifacts(args, toolchain_include_dir, tscc_include_dir, 'TSCclibc') - -def install_module(args, build_dir, package_subpath, toolchain_lib, module_name, targets): - toolchain_module_dir = os.path.join(toolchain_lib, module_name + '.swiftmodule') - mkdir_p(toolchain_module_dir) - for target in targets: - swift_dir = os.path.join(build_dir, target, - package_subpath) - for fileext in ['.swiftmodule', '.swiftdoc']: - install_binary(module_name + fileext, swift_dir, toolchain_module_dir, args.verbose) - os.rename(os.path.join(toolchain_module_dir, module_name + fileext), - os.path.join(toolchain_module_dir, target + fileext)) - -# Copy over the contents of a module's include directory contents (modulemap, headers, etc.) -def install_include_artifacts(args, toolchain_include_dir, src_include_dir, dst_module_name): - toolchain_module_include_dir = os.path.join(toolchain_include_dir, dst_module_name) - if os.path.exists(toolchain_module_include_dir): - shutil.rmtree(toolchain_module_include_dir, ignore_errors=True) - shutil.copytree(src_include_dir, toolchain_module_include_dir) + # TSCclibc C module's modulemap and header files + tscc_include_dir = os.path.join( + os.path.dirname(args.package_path), + "swift-tools-support-core", + "Sources", + "TSCclibc", + "include", + ) + install_include_artifacts( + args, toolchain_include_dir, tscc_include_dir, "TSCclibc" + ) + + +def install_module( + args, build_dir, package_subpath, toolchain_lib, module_name, targets +): + toolchain_module_dir = os.path.join( + toolchain_lib, module_name + ".swiftmodule" + ) + mkdir_p(toolchain_module_dir) + for target in targets: + swift_dir = os.path.join(build_dir, target, package_subpath) + for fileext in [".swiftmodule", ".swiftdoc"]: + install_binary( + module_name + fileext, + swift_dir, + toolchain_module_dir, + args.verbose, + ) + os.rename( + os.path.join(toolchain_module_dir, module_name + fileext), + os.path.join(toolchain_module_dir, target + fileext), + ) + + +# Copy over the contents of a module's include directory contents +# (modulemap, headers, etc.) +def install_include_artifacts( + args, toolchain_include_dir, src_include_dir, dst_module_name +): + toolchain_module_include_dir = os.path.join( + toolchain_include_dir, dst_module_name + ) + if os.path.exists(toolchain_module_include_dir): + shutil.rmtree(toolchain_module_include_dir, ignore_errors=True) + shutil.copytree(src_include_dir, toolchain_module_include_dir) + def build_using_cmake(args, toolchain_bin, build_dir, targets): - swiftc_exec = os.path.join(toolchain_bin, 'swiftc') - base_swift_flags = [] - if args.configuration == 'debug': - base_swift_flags.append('-Onone') - base_swift_flags.append('-DDEBUG') - - if args.enable_asan: - base_swift_flags.append('-sanitize=address') - # This is currently needed to work around a swift-driver - # bug when building with a 5.8 host toolchain. - base_swift_flags.append('-Xclang-linker') - base_swift_flags.append('-fsanitize=address') - - # Ensure we are not sharing the module cache with concurrent builds in CI - base_swift_flags.append('-module-cache-path "{}"'.format(os.path.join(build_dir, 'module-cache'))) - - for target in targets: - base_cmake_flags = [] - swift_flags = base_swift_flags.copy() - swift_flags.append('-target %s' % target) - if '-apple-macosx' in args.build_target: - base_cmake_flags.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=%s' % macos_deployment_target) - base_cmake_flags.append('-DCMAKE_OSX_ARCHITECTURES=%s' % target.split('-')[0]) - - # Target directory for build artifacts - # If building for a local compiler build, use the build directory directly - if args.local_compiler_build: - cmake_target_dir = build_dir - else: - cmake_target_dir = os.path.join(build_dir, target) - - driver_dir = os.path.join(cmake_target_dir, args.configuration) - dependencies_dir = os.path.join(driver_dir, 'dependencies') - - # LLBuild - build_llbuild_using_cmake(args, target, swiftc_exec, dependencies_dir, - base_cmake_flags, swift_flags) - - # TSC - build_tsc_using_cmake(args, target, swiftc_exec, dependencies_dir, - base_cmake_flags, swift_flags) - # Argument Parser - build_argument_parser_using_cmake(args, target, swiftc_exec, dependencies_dir, - base_cmake_flags, swift_flags) - # SwiftDriver - build_swift_driver_using_cmake(args, target, swiftc_exec, driver_dir, - base_cmake_flags, swift_flags) - -def build_llbuild_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags): - print('Building Swift Driver dependency: llbuild') - llbuild_source_dir = os.path.join(os.path.dirname(args.package_path), 'llbuild') - llbuild_build_dir = os.path.join(build_dir, 'llbuild') - llbuild_api_dir = os.path.join(llbuild_build_dir, '.cmake/api/v1/query') - mkdir_p(llbuild_api_dir) - subprocess.check_call(['touch', os.path.join(llbuild_api_dir, 'codemodel-v2')]) - flags = [ - '-DCMAKE_C_COMPILER:=clang', - '-DCMAKE_CXX_COMPILER:=clang++', - '-DCMAKE_CXX_FLAGS=-target %s' % target, - '-DLLBUILD_SUPPORT_BINDINGS:=Swift' + swiftc_exec = os.path.join(toolchain_bin, "swiftc") + base_swift_flags = [] + if args.configuration == "debug": + base_swift_flags.append("-Onone") + base_swift_flags.append("-DDEBUG") + + if args.enable_asan: + base_swift_flags.append("-sanitize=address") + # This is currently needed to work around a swift-driver + # bug when building with a 5.8 host toolchain. + base_swift_flags.append("-Xclang-linker") + base_swift_flags.append("-fsanitize=address") + + # Ensure we are not sharing the module cache with concurrent builds in CI + base_swift_flags.append( + '-module-cache-path "{}"'.format( + os.path.join(build_dir, "module-cache") + ) + ) + + for target in targets: + base_cmake_flags = [] + swift_flags = base_swift_flags.copy() + swift_flags.append("-target %s" % target) + if "-apple-macosx" in args.build_target: + base_cmake_flags.append( + "-DCMAKE_OSX_DEPLOYMENT_TARGET=%s" % macos_deployment_target + ) + base_cmake_flags.append( + "-DCMAKE_OSX_ARCHITECTURES=%s" % target.split("-")[0] + ) + + # Target directory for build artifacts + # If building for a local compiler build, use the build directory + # directly + if args.local_compiler_build: + cmake_target_dir = build_dir + else: + cmake_target_dir = os.path.join(build_dir, target) + + driver_dir = os.path.join(cmake_target_dir, args.configuration) + dependencies_dir = os.path.join(driver_dir, "dependencies") + + # LLBuild + build_llbuild_using_cmake( + args, + target, + swiftc_exec, + dependencies_dir, + base_cmake_flags, + swift_flags, + ) + + # TSC + build_tsc_using_cmake( + args, + target, + swiftc_exec, + dependencies_dir, + base_cmake_flags, + swift_flags, + ) + # Argument Parser + build_argument_parser_using_cmake( + args, + target, + swiftc_exec, + dependencies_dir, + base_cmake_flags, + swift_flags, + ) + # SwiftDriver + build_swift_driver_using_cmake( + args, + target, + swiftc_exec, + driver_dir, + base_cmake_flags, + swift_flags, + ) + + +def build_llbuild_using_cmake( + args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags +): + print("Building Swift Driver dependency: llbuild") + llbuild_source_dir = os.path.join( + os.path.dirname(args.package_path), "llbuild" + ) + llbuild_build_dir = os.path.join(build_dir, "llbuild") + llbuild_api_dir = os.path.join(llbuild_build_dir, ".cmake/api/v1/query") + mkdir_p(llbuild_api_dir) + subprocess.check_call( + ["touch", os.path.join(llbuild_api_dir, "codemodel-v2")] + ) + flags = [ + "-DCMAKE_C_COMPILER:=clang", + "-DCMAKE_CXX_COMPILER:=clang++", + "-DCMAKE_CXX_FLAGS=-target %s" % target, + "-DLLBUILD_SUPPORT_BINDINGS:=Swift", + ] + llbuild_cmake_flags = base_cmake_flags + flags + if args.sysroot: + llbuild_cmake_flags.append( + "-DSQLite3_INCLUDE_DIR=%s/usr/include" % args.sysroot + ) + # FIXME: This may be particularly hacky but CMake finds a different + # version of libsqlite3 on some machines. + # This is also Darwin-specific... + if "-apple-macosx" in args.build_target: + llbuild_cmake_flags.append( + "-DSQLite3_LIBRARY=%s/usr/lib/libsqlite3.tbd" % args.sysroot + ) + llbuild_swift_flags = swift_flags[:] + + # Build only a subset of llbuild (in particular skipping tests) + cmake_build( + args, + swiftc_exec, + llbuild_cmake_flags, + llbuild_swift_flags, + llbuild_source_dir, + llbuild_build_dir, + "products/all", + ) + + +def build_tsc_using_cmake( + args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags +): + print("Building Swift Driver dependency: TSC") + tsc_source_dir = os.path.join( + os.path.dirname(args.package_path), "swift-tools-support-core" + ) + tsc_build_dir = os.path.join(build_dir, "swift-tools-support-core") + flags = [] + tsc_cmake_flags = base_cmake_flags + flags + + tsc_swift_flags = swift_flags[:] + cmake_build( + args, + swiftc_exec, + tsc_cmake_flags, + tsc_swift_flags, + tsc_source_dir, + tsc_build_dir, + ) + + +def build_argument_parser_using_cmake( + args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags +): + print("Building Swift Driver dependency: Argument Parser") + parser_source_dir = os.path.join( + os.path.dirname(args.package_path), "swift-argument-parser" + ) + parser_build_dir = os.path.join(build_dir, "swift-argument-parser") + custom_flags = ["-DBUILD_TESTING=NO", "-DBUILD_EXAMPLES=NO"] + parser_cmake_flags = base_cmake_flags + custom_flags + parser_swift_flags = swift_flags[:] + cmake_build( + args, + swiftc_exec, + parser_cmake_flags, + parser_swift_flags, + parser_source_dir, + parser_build_dir, + ) + return + + +def build_swift_driver_using_cmake( + args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags +): + print("Building Swift Driver for target: %s" % target) + driver_source_dir = args.package_path + driver_build_dir = build_dir + dependencies_dir = os.path.join(build_dir, "dependencies") + # TODO: Enable Library Evolution + driver_swift_flags = swift_flags[:] + flags = [ + "-DLLBuild_DIR=" + + os.path.join( + os.path.join(dependencies_dir, "llbuild"), "cmake/modules" + ), + "-DTSC_DIR=" + + os.path.join( + os.path.join(dependencies_dir, "swift-tools-support-core"), + "cmake/modules", + ), + "-DArgumentParser_DIR=" + + os.path.join( + os.path.join(dependencies_dir, "swift-argument-parser"), + "cmake/modules", + ), ] - llbuild_cmake_flags = base_cmake_flags + flags - if args.sysroot: - llbuild_cmake_flags.append('-DSQLite3_INCLUDE_DIR=%s/usr/include' % args.sysroot) - # FIXME: This may be particularly hacky but CMake finds a different version of libsqlite3 - # on some machines. This is also Darwin-specific... - if '-apple-macosx' in args.build_target: - llbuild_cmake_flags.append('-DSQLite3_LIBRARY=%s/usr/lib/libsqlite3.tbd' % args.sysroot) - llbuild_swift_flags = swift_flags[:] - - # Build only a subset of llbuild (in particular skipping tests) - cmake_build(args, swiftc_exec, llbuild_cmake_flags, llbuild_swift_flags, - llbuild_source_dir, llbuild_build_dir, 'products/all') - -def build_tsc_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags): - print('Building Swift Driver dependency: TSC') - tsc_source_dir = os.path.join(os.path.dirname(args.package_path), 'swift-tools-support-core') - tsc_build_dir = os.path.join(build_dir, 'swift-tools-support-core') - flags = [] - tsc_cmake_flags = base_cmake_flags + flags - - tsc_swift_flags = swift_flags[:] - cmake_build(args, swiftc_exec, tsc_cmake_flags, tsc_swift_flags, - tsc_source_dir, tsc_build_dir) - -def build_argument_parser_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags): - print('Building Swift Driver dependency: Argument Parser') - parser_source_dir = os.path.join(os.path.dirname(args.package_path), 'swift-argument-parser') - parser_build_dir = os.path.join(build_dir, 'swift-argument-parser') - custom_flags = ['-DBUILD_TESTING=NO', '-DBUILD_EXAMPLES=NO'] - parser_cmake_flags = base_cmake_flags + custom_flags - parser_swift_flags = swift_flags[:] - cmake_build(args, swiftc_exec, parser_cmake_flags, parser_swift_flags, - parser_source_dir, parser_build_dir) - return - -def build_swift_driver_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_flags, swift_flags): - print('Building Swift Driver for target: %s' % target) - driver_source_dir = args.package_path - driver_build_dir = build_dir - dependencies_dir = os.path.join(build_dir, 'dependencies') - # TODO: Enable Library Evolution - driver_swift_flags = swift_flags[:] - flags = [ - '-DLLBuild_DIR=' + os.path.join(os.path.join(dependencies_dir, 'llbuild'), 'cmake/modules'), - '-DTSC_DIR=' + os.path.join(os.path.join(dependencies_dir, 'swift-tools-support-core'), 'cmake/modules'), - '-DArgumentParser_DIR=' + os.path.join(os.path.join(dependencies_dir, 'swift-argument-parser'), 'cmake/modules')] - driver_cmake_flags = base_cmake_flags + flags - cmake_build(args, swiftc_exec, driver_cmake_flags, driver_swift_flags, - driver_source_dir, driver_build_dir) - -def cmake_build(args, swiftc_exec, cmake_args, swift_flags, source_path, - build_dir, ninja_target=None): - """Configure with CMake and build with Ninja""" - if args.sysroot: - swift_flags.append('-sdk %s' % args.sysroot) - cmd = [ - args.cmake_bin, '-G', 'Ninja', - '-DCMAKE_MAKE_PROGRAM=%s' % args.ninja_bin, - '-DCMAKE_BUILD_TYPE:=Release', - '-DCMAKE_Swift_FLAGS=' + ' '.join(swift_flags), - '-DCMAKE_Swift_COMPILER:=%s' % (swiftc_exec), - ] + cmake_args + [source_path] - if args.verbose: - print(' '.join(cmd)) - mkdir_p(build_dir) - subprocess.check_output(cmd, cwd=build_dir) - - # Invoke Ninja - ninja_cmd = [args.ninja_bin] - if args.verbose: - ninja_cmd.append('-v') - if ninja_target is not None: - ninja_cmd.append(ninja_target) - - if args.verbose: - print(' '.join(ninja_cmd)) - # Note: encoding is explicitly set to None to indicate that the output must - # be bytes, not strings. This is to work around per-system differences in - # default encoding. Some systems have a default encoding of 'ascii', but that - # conflicts with this output, which can contain UTF encoded characters. The - # bytes are then written, instead of printed, to bypass issues with encoding. - ninjaProcess = subprocess.Popen(ninja_cmd, cwd=build_dir, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - env=os.environ, - encoding=None) - stdout, stderr = ninjaProcess.communicate() - if ninjaProcess.returncode != 0: - sys.stdout.buffer.write(stdout) - print('Ninja invocation failed: ') - sys.stderr.buffer.write(stderr) - sys.exit(ninjaProcess.returncode) - if args.verbose: - sys.stdout.buffer.write(stdout) + driver_cmake_flags = base_cmake_flags + flags + cmake_build( + args, + swiftc_exec, + driver_cmake_flags, + driver_swift_flags, + driver_source_dir, + driver_build_dir, + ) + + +def cmake_build( + args, + swiftc_exec, + cmake_args, + swift_flags, + source_path, + build_dir, + ninja_target=None, +): + """Configure with CMake and build with Ninja""" + if args.sysroot: + swift_flags.append("-sdk %s" % args.sysroot) + cmd = ( + [ + args.cmake_bin, + "-G", + "Ninja", + "-DCMAKE_MAKE_PROGRAM=%s" % args.ninja_bin, + "-DCMAKE_BUILD_TYPE:=Release", + "-DCMAKE_Swift_FLAGS=" + " ".join(swift_flags), + "-DCMAKE_Swift_COMPILER:=%s" % (swiftc_exec), + ] + + cmake_args + [source_path] + ) + if args.verbose: + print(" ".join(cmd)) + mkdir_p(build_dir) + subprocess.check_output(cmd, cwd=build_dir) + + # Invoke Ninja + ninja_cmd = [args.ninja_bin] + if args.verbose: + ninja_cmd.append("-v") + if ninja_target is not None: + ninja_cmd.append(ninja_target) + + if args.verbose: + print(" ".join(ninja_cmd)) + # Note: encoding is explicitly set to None to indicate that the output must + # be bytes, not strings. This is to work around per-system differences in + # default encoding. Some systems have a default encoding of 'ascii', but + # that conflicts with this output, which can contain UTF encoded + # characters. The bytes are then written, instead of printed, to bypass + # issues with encoding. + ninjaProcess = subprocess.Popen( + ninja_cmd, + cwd=build_dir, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + env=os.environ, + encoding=None, + ) + stdout, stderr = ninjaProcess.communicate() + if ninjaProcess.returncode != 0: + sys.stdout.buffer.write(stdout) + print("Ninja invocation failed: ") + sys.stderr.buffer.write(stderr) + sys.exit(ninjaProcess.returncode) + if args.verbose: + sys.stdout.buffer.write(stdout) + def get_build_target(swiftc_path, args, cross_compile=False): """Returns the target-triple of the current machine.""" try: - command = [swiftc_path, '-print-target-info'] + command = [swiftc_path, "-print-target-info"] if cross_compile: cross_compile_json = json.load(open(args.cross_compile_config)) - command += ['-target', cross_compile_json["target"]] - target_info_json = subprocess.check_output(command, - stderr=subprocess.PIPE, - universal_newlines=True).strip() + command += ["-target", cross_compile_json["target"]] + target_info_json = subprocess.check_output( + command, stderr=subprocess.PIPE, universal_newlines=True + ).strip() args.target_info = json.loads(target_info_json) - triple = args.target_info['target']['triple'] + triple = args.target_info["target"]["triple"] # Windows also wants unversionedTriple, but does not use this. - if '-apple-macosx' in args.target_info["target"]["unversionedTriple"]: - triple = args.target_info['target']['unversionedTriple'] + if "-apple-macosx" in args.target_info["target"]["unversionedTriple"]: + triple = args.target_info["target"]["unversionedTriple"] return triple except Exception as e: error(str(e)) + def main(): - parser = argparse.ArgumentParser(description='Build along with the Swift build-script.') - def add_common_args(parser): - parser.add_argument('--package-path', metavar='PATH', help='directory of the package to build', default='.') - parser.add_argument('--toolchain', required=True, metavar='PATH', help='build using the toolchain at PATH') - parser.add_argument( - '--prefix', - dest='install_prefixes', - nargs='*', - help='paths (relative to the project root) where to install build products [%(default)s]', - metavar='PATHS') - parser.add_argument( - '--cross-compile-hosts', - dest='cross_compile_hosts', - nargs='*', - help='List of cross compile hosts targets.', - default=[]) - parser.add_argument( - '--cross-compile-config', - metavar='PATH', - help="A JSON SPM config file with Swift flags for cross-compilation") - parser.add_argument('--ninja-bin', metavar='PATH', help='ninja binary to use for testing') - parser.add_argument('--cmake-bin', metavar='PATH', help='cmake binary to use for building') - parser.add_argument('--build-path', metavar='PATH', default='.build', help='build in the given path') - parser.add_argument('--foundation-build-dir', metavar='PATH', help='Path to the Foundation build directory') - parser.add_argument('--dispatch-build-dir', metavar='PATH', help='Path to the Dispatch build directory') - parser.add_argument('--lit-test-dir', metavar='PATH', help='the test dir in the Swift build directory') - parser.add_argument('--configuration', '-c', default='debug', help='build using configuration (release|debug)') - parser.add_argument('--no-local-deps', action='store_true', help='use normal remote dependencies when building') - parser.add_argument('--verbose', '-v', action='store_true', help='enable verbose output') - parser.add_argument('--local_compiler_build', action='store_true', help='driver is being built for use with a local compiler build') - parser.add_argument('--enable-asan', action='store_true', help='driver is being built with ASAN support') - - subparsers = parser.add_subparsers(title='subcommands', dest='action', metavar='action') - clean_parser = subparsers.add_parser('clean', help='clean the package') - add_common_args(clean_parser) - - build_parser = subparsers.add_parser('build', help='build the package') - add_common_args(build_parser) - - test_parser = subparsers.add_parser('test', help='test the package') - add_common_args(test_parser) - - install_parser = subparsers.add_parser('install', help='build the package') - add_common_args(install_parser) - - args = parser.parse_args(sys.argv[1:]) - - # Canonicalize paths - args.package_path = os.path.abspath(args.package_path) - args.build_path = os.path.abspath(args.build_path) - args.toolchain = os.path.abspath(args.toolchain) - - swift_exec = os.path.join(os.path.join(args.toolchain, 'bin'), 'swiftc') - args.build_target = get_build_target(swift_exec, args, cross_compile=(True if args.cross_compile_config else False)) - if '-apple-macosx' in args.build_target: - args.sysroot = call_output(["xcrun", "--sdk", "macosx", "--show-sdk-path"], verbose=args.verbose) - else: - args.sysroot = None - - if (args.build_target == 'x86_64-apple-macosx' and 'macosx-arm64' in args.cross_compile_hosts): - args.cross_compile_hosts = [args.build_target + macos_deployment_target, 'arm64-apple-macosx%s' % macos_deployment_target] - elif (args.build_target == 'arm64-apple-macosx' and 'macosx-x86_64' in args.cross_compile_hosts): - args.cross_compile_hosts = [args.build_target + macos_deployment_target, 'x86_64-apple-macosx%s' % macos_deployment_target] - elif args.cross_compile_hosts and 'android-' in args.cross_compile_hosts[0]: - print('Cross-compiling for %s' % args.cross_compile_hosts[0]) - elif args.cross_compile_hosts: - error("cannot cross-compile for %s" % cross_compile_hosts) - - if args.cross_compile_hosts and args.local_compiler_build: - error('Cross-compilation is currently not supported for the local compiler installation') - - if args.dispatch_build_dir: - args.dispatch_build_dir = os.path.abspath(args.dispatch_build_dir) - - if args.foundation_build_dir: - args.foundation_build_dir = os.path.abspath(args.foundation_build_dir) - - if args.lit_test_dir: - args.lit_test_dir = os.path.abspath(args.lit_test_dir) - - # If a separate prefix has not been specified, installed into the specified toolchain - if not args.install_prefixes: - args.install_prefixes = [args.toolchain] - - handle_invocation(args) - -if __name__ == '__main__': - main() + parser = argparse.ArgumentParser( + description="Build along with the Swift build-script." + ) + + def add_common_args(parser): + parser.add_argument( + "--package-path", + metavar="PATH", + help="directory of the package to build", + default=".", + ) + parser.add_argument( + "--toolchain", + required=True, + metavar="PATH", + help="build using the toolchain at PATH", + ) + parser.add_argument( + "--prefix", + dest="install_prefixes", + nargs="*", + help="paths (relative to the project root) where to install " + "build products [%(default)s]", + metavar="PATHS", + ) + parser.add_argument( + "--cross-compile-hosts", + dest="cross_compile_hosts", + nargs="*", + help="List of cross compile hosts targets.", + default=[], + ) + parser.add_argument( + "--cross-compile-config", + metavar="PATH", + help="A JSON SPM config file with Swift flags for " + "cross-compilation", + ) + parser.add_argument( + "--ninja-bin", + metavar="PATH", + help="ninja binary to use for testing", + ) + parser.add_argument( + "--cmake-bin", + metavar="PATH", + help="cmake binary to use for building", + ) + parser.add_argument( + "--build-path", + metavar="PATH", + default=".build", + help="build in the given path", + ) + parser.add_argument( + "--foundation-build-dir", + metavar="PATH", + help="Path to the Foundation build directory", + ) + parser.add_argument( + "--dispatch-build-dir", + metavar="PATH", + help="Path to the Dispatch build directory", + ) + parser.add_argument( + "--lit-test-dir", + metavar="PATH", + help="the test dir in the Swift build directory", + ) + parser.add_argument( + "--configuration", + "-c", + default="debug", + help="build using configuration (release|debug)", + ) + parser.add_argument( + "--no-local-deps", + action="store_true", + help="use normal remote dependencies when building", + ) + parser.add_argument( + "--verbose", + "-v", + action="store_true", + help="enable verbose output", + ) + parser.add_argument( + "--local_compiler_build", + action="store_true", + help="driver is being built for use with a local compiler build", + ) + parser.add_argument( + "--enable-asan", + action="store_true", + help="driver is being built with ASAN support", + ) + + subparsers = parser.add_subparsers( + title="subcommands", dest="action", metavar="action" + ) + clean_parser = subparsers.add_parser("clean", help="clean the package") + add_common_args(clean_parser) + + build_parser = subparsers.add_parser("build", help="build the package") + add_common_args(build_parser) + + test_parser = subparsers.add_parser("test", help="test the package") + add_common_args(test_parser) + + install_parser = subparsers.add_parser("install", help="build the package") + add_common_args(install_parser) + + args = parser.parse_args(sys.argv[1:]) + + # Canonicalize paths + args.package_path = os.path.abspath(args.package_path) + args.build_path = os.path.abspath(args.build_path) + args.toolchain = os.path.abspath(args.toolchain) + + swift_exec = os.path.join(os.path.join(args.toolchain, "bin"), "swiftc") + args.build_target = get_build_target( + swift_exec, + args, + cross_compile=(True if args.cross_compile_config else False), + ) + if "-apple-macosx" in args.build_target: + args.sysroot = call_output( + ["xcrun", "--sdk", "macosx", "--show-sdk-path"], + verbose=args.verbose, + ) + else: + args.sysroot = None + + if ( + args.build_target == "x86_64-apple-macosx" and + "macosx-arm64" in args.cross_compile_hosts + ): + args.cross_compile_hosts = [ + args.build_target + macos_deployment_target, + "arm64-apple-macosx%s" % macos_deployment_target, + ] + elif ( + args.build_target == "arm64-apple-macosx" and + "macosx-x86_64" in args.cross_compile_hosts + ): + args.cross_compile_hosts = [ + args.build_target + macos_deployment_target, + "x86_64-apple-macosx%s" % macos_deployment_target, + ] + elif ( + args.cross_compile_hosts and "android-" in args.cross_compile_hosts[0] + ): + print("Cross-compiling for %s" % args.cross_compile_hosts[0]) + elif args.cross_compile_hosts: + error("cannot cross-compile for %s" % args.cross_compile_hosts) + + if args.cross_compile_hosts and args.local_compiler_build: + error( + "Cross-compilation is currently not supported for " + "the local compiler installation" + ) + + if args.dispatch_build_dir: + args.dispatch_build_dir = os.path.abspath(args.dispatch_build_dir) + + if args.foundation_build_dir: + args.foundation_build_dir = os.path.abspath(args.foundation_build_dir) + + if args.lit_test_dir: + args.lit_test_dir = os.path.abspath(args.lit_test_dir) + + # If a separate prefix has not been specified, installed into the + # specified toolchain + if not args.install_prefixes: + args.install_prefixes = [args.toolchain] + + handle_invocation(args) + + +if __name__ == "__main__": + main() From 3bfd7caf072fd5cc2e0a25394eabaa3b4d5a836c Mon Sep 17 00:00:00 2001 From: Artem Chikin Date: Thu, 6 Nov 2025 11:42:34 -0800 Subject: [PATCH 4/4] Canonicalize the license header --- CMakeLists.txt | 4 ++-- Sources/CMakeLists.txt | 4 ++-- Sources/CSwiftScan/CMakeLists.txt | 4 ++-- Sources/CSwiftScan/include/swiftscan_header.h | 9 +++++---- Sources/SwiftDriver/CMakeLists.txt | 4 ++-- Sources/SwiftDriver/Driver/CompilerMode.swift | 14 ++++++++------ Sources/SwiftDriver/Driver/DebugInfo.swift | 14 ++++++++------ Sources/SwiftDriver/Driver/Driver.swift | 14 ++++++++------ Sources/SwiftDriver/Driver/DriverVersion.swift | 14 ++++++++------ Sources/SwiftDriver/Driver/LinkKind.swift | 14 ++++++++------ .../SwiftDriver/Driver/ModuleOutputInfo.swift | 14 ++++++++------ Sources/SwiftDriver/Driver/OutputFileMap.swift | 14 ++++++++------ .../Driver/ToolExecutionDelegate.swift | 14 ++++++++------ .../SwiftDriver/Driver/WindowsExtensions.swift | 14 ++++++++------ .../SwiftDriver/Execution/ArgsResolver.swift | 14 ++++++++------ .../SwiftDriver/Execution/DriverExecutor.swift | 14 ++++++++------ .../SwiftDriver/Execution/ParsableOutput.swift | 14 ++++++++------ .../Execution/ProcessProtocol.swift | 14 ++++++++------ Sources/SwiftDriver/Execution/ProcessSet.swift | 12 +++++++----- .../ExplicitDependencyBuildPlanner.swift | 14 ++++++++------ .../CommonDependencyOperations.swift | 10 ++++++---- .../InterModuleDependencyGraph.swift | 10 ++++++---- .../InterModuleDependencyOracle.swift | 10 ++++++---- .../ModuleDependencyScanning.swift | 14 ++++++++------ .../SerializableModuleArtifacts.swift | 14 ++++++++------ .../Bitcode/Bitcode.swift | 14 ++++++++------ .../Bitcode/BitcodeElement.swift | 14 ++++++++------ .../IncrementalCompilation/Bitcode/Bits.swift | 14 ++++++++------ .../Bitcode/Bitstream.swift | 14 ++++++++------ .../Bitcode/BitstreamReader.swift | 14 ++++++++------ .../Bitcode/BitstreamVisitor.swift | 14 ++++++++------ .../Bitcode/BitstreamWriter.swift | 14 ++++++++------ .../Bitcode/BlockInfo.swift | 14 ++++++++------ .../IncrementalCompilation/BuildRecord.swift | 14 ++++++++------ .../BuildRecordInfo.swift | 14 ++++++++------ .../DependencyGraphDotFileWriter.swift | 14 ++++++++------ .../IncrementalCompilation/DependencyKey.swift | 14 ++++++++------ .../DirectAndTransitiveCollections.swift | 14 ++++++++------ ...ernalDependencyAndFingerprintEnforcer.swift | 14 ++++++++------ .../FirstWaveComputer.swift | 14 ++++++++------ .../IncrementalCompilationProtectedState.swift | 14 ++++++++------ ...ncrementalCompilationState+Extensions.swift | 12 +++++++----- .../IncrementalCompilationState.swift | 14 ++++++++------ .../IncrementalCompilationSynchronizer.swift | 14 ++++++++------ .../IncrementalDependencyAndInputSetup.swift | 14 ++++++++------ .../IncrementalCompilation/InputInfo.swift | 14 ++++++++------ .../KeyAndFingerprintHolder.swift | 16 ++++++++-------- .../ModuleDependencyGraph.swift | 14 ++++++++------ .../DependencySource.swift | 14 ++++++++------ .../Integrator.swift | 14 ++++++++------ .../InternedStrings.swift | 14 ++++++++------ .../ModuleDependencyGraphParts/Node.swift | 14 ++++++++------ .../NodeFinder.swift | 14 ++++++++------ .../ModuleDependencyGraphParts/Tracer.swift | 14 ++++++++------ .../Multidictionary.swift | 14 ++++++++------ .../SourceFileDependencyGraph.swift | 14 ++++++++------ .../SwiftSourceFile.swift | 14 ++++++++------ .../IncrementalCompilation/TwoDMap.swift | 14 ++++++++------ .../IncrementalCompilation/TwoLevelMap.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/APIDigesterJobs.swift | 14 ++++++++------ .../SwiftDriver/Jobs/AutolinkExtractJob.swift | 14 ++++++++------ .../Jobs/CommandLineArguments.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/CompileJob.swift | 14 ++++++++------ .../Jobs/DarwinToolchain+LinkerSupport.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/EmitModuleJob.swift | 14 ++++++++------ .../Jobs/EmitSupportedFeaturesJob.swift | 16 +++++++++------- .../SwiftDriver/Jobs/FrontendJobHelpers.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/GenerateDSYMJob.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/GeneratePCHJob.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/GeneratePCMJob.swift | 14 ++++++++------ .../GenericUnixToolchain+LinkerSupport.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/InterpretJob.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/Job.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/LinkJob.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/ModuleWrapJob.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/Planning.swift | 14 ++++++++------ .../SwiftDriver/Jobs/PrebuiltModulesJob.swift | 14 ++++++++------ .../Jobs/PrintSupportedFeaturesJob.swift | 14 ++++++++------ .../SwiftDriver/Jobs/PrintTargetInfoJob.swift | 14 ++++++++------ Sources/SwiftDriver/Jobs/ReplJob.swift | 14 ++++++++------ .../SwiftDriver/Jobs/SwiftHelpIntroJob.swift | 14 ++++++++------ .../Jobs/Toolchain+InterpreterSupport.swift | 14 ++++++++------ .../Jobs/Toolchain+LinkerSupport.swift | 14 ++++++++------ .../SwiftDriver/Jobs/VerifyDebugInfoJob.swift | 14 ++++++++------ .../Jobs/VerifyModuleInterfaceJob.swift | 14 ++++++++------ .../WebAssemblyToolchain+LinkerSupport.swift | 14 ++++++++------ .../Jobs/WindowsToolchain+LinkerSupport.swift | 14 ++++++++------ .../SwiftScan/DependencyGraphBuilder.swift | 14 ++++++++------ Sources/SwiftDriver/SwiftScan/Loader.swift | 12 +++++++----- Sources/SwiftDriver/SwiftScan/SwiftScan.swift | 14 ++++++++------ .../SwiftDriver/SwiftScan/SwiftScanCAS.swift | 14 ++++++++------ .../Toolchains/DarwinToolchain.swift | 14 ++++++++------ .../Toolchains/GenericUnixToolchain.swift | 14 ++++++++------ Sources/SwiftDriver/Toolchains/Toolchain.swift | 14 ++++++++------ .../Toolchains/WebAssemblyToolchain.swift | 14 ++++++++------ .../Toolchains/WindowsToolchain.swift | 14 ++++++++------ .../ToolingInterface/SimpleExecutor.swift | 14 ++++++++------ .../ToolingInterface/ToolingUtil.swift | 14 ++++++++------ .../Utilities/DOTJobGraphSerializer.swift | 14 ++++++++------ .../DOTModuleDependencyGraphSerializer.swift | 14 ++++++++------ .../SwiftDriver/Utilities/DateAdditions.swift | 14 ++++++++------ .../SwiftDriver/Utilities/Diagnostics.swift | 14 ++++++++------ Sources/SwiftDriver/Utilities/FileList.swift | 14 ++++++++------ .../SwiftDriver/Utilities/FileMetadata.swift | 14 ++++++++------ Sources/SwiftDriver/Utilities/FileType.swift | 14 ++++++++------ .../PredictableRandomNumberGenerator.swift | 14 ++++++++------ .../Utilities/PythonArchitecture.swift | 14 ++++++++------ .../Utilities/RelativePathAdditions.swift | 14 ++++++++------ Sources/SwiftDriver/Utilities/Sanitizer.swift | 14 ++++++++------ .../Utilities/StringAdditions.swift | 14 ++++++++------ Sources/SwiftDriver/Utilities/System.swift | 14 ++++++++------ .../Utilities/Triple+Platforms.swift | 14 ++++++++------ Sources/SwiftDriver/Utilities/Triple.swift | 14 ++++++++------ .../Utilities/TypedVirtualPath.swift | 14 ++++++++------ Sources/SwiftDriver/Utilities/Version.swift | 14 ++++++++------ .../SwiftDriver/Utilities/VirtualPath.swift | 14 ++++++++------ Sources/SwiftDriverExecution/CMakeLists.txt | 4 ++-- .../MultiJobExecutor.swift | 14 ++++++++------ .../SwiftDriverExecutor.swift | 14 ++++++++------ Sources/SwiftDriverExecution/llbuild.swift | 14 ++++++++------ Sources/SwiftOptions/CMakeLists.txt | 4 ++-- Sources/SwiftOptions/DriverKind.swift | 14 ++++++++------ Sources/SwiftOptions/Option.swift | 14 ++++++++------ Sources/SwiftOptions/OptionParsing.swift | 14 ++++++++------ Sources/SwiftOptions/OptionTable.swift | 14 ++++++++------ Sources/SwiftOptions/Options.swift | 10 ++++++---- Sources/SwiftOptions/ParsedOptions.swift | 14 ++++++++------ Sources/SwiftOptions/PrefixTrie.swift | 14 ++++++++------ Sources/makeOptions/CMakeLists.txt | 4 ++-- Sources/makeOptions/main.cpp | 10 ++++++---- Sources/makeOptions/makeOptions.cpp | 18 ++++++++++-------- .../swift-build-sdk-interfaces/CMakeLists.txt | 4 ++-- Sources/swift-build-sdk-interfaces/main.swift | 15 +++++++++------ Sources/swift-driver/CMakeLists.txt | 4 ++-- Sources/swift-driver/main.swift | 15 +++++++++------ Sources/swift-help/CMakeLists.txt | 4 ++-- Sources/swift-help/main.swift | 14 ++++++++------ .../AddFuncInImportedExtensionTest.swift | 10 ++++++---- .../IncrementalImportTests/Antisymmetry.swift | 10 ++++++---- ...deAndShowFuncInStructAndExtensionTest.swift | 10 ++++++---- .../RenameMemberOfImportedStructTest.swift | 10 ++++++---- ...ncAdditionInExtensionWithinModuleTest.swift | 10 ++++++---- .../IncrementalImportTests/Transitivity.swift | 10 ++++++---- Tests/IncrementalTestFramework/AddOn.swift | 10 ++++++---- .../CompiledSourceCollector.swift | 10 ++++++---- Tests/IncrementalTestFramework/Context.swift | 10 ++++++---- .../IncrementalTestFramework/Expectation.swift | 10 ++++++---- .../ExpectedCompilations.swift | 10 ++++++---- .../ExpectedProcessResult.swift | 10 ++++++---- .../IncrementalTest.swift | 10 ++++++---- Tests/IncrementalTestFramework/Module.swift | 10 ++++++---- Tests/IncrementalTestFramework/Source.swift | 10 ++++++---- Tests/IncrementalTestFramework/Step.swift | 10 ++++++---- Tests/SwiftDriverTests/APIDigesterTests.swift | 10 ++++++---- .../AssertDiagnosticsTests.swift | 10 ++++++---- Tests/SwiftDriverTests/CachingBuildTests.swift | 10 ++++++---- .../CrossModuleIncrementalBuildTests.swift | 10 ++++++---- .../DependencyGraphSerializationTests.swift | 10 ++++++---- .../ExplicitModuleBuildTests.swift | 10 ++++++---- .../Helpers/AssertDiagnostics.swift | 10 ++++++---- .../MockingIncrementalCompilation.swift | 10 ++++++---- .../Helpers/Permutations.swift | 10 ++++++---- .../Helpers/XCTestExtensions.swift | 10 ++++++---- .../IncrementalCompilationTests.swift | 10 ++++++---- .../ExplicitModuleDependencyBuildInputs.swift | 10 ++++++---- .../Inputs/IncrementalCompilationInputs.swift | 10 ++++++---- Tests/SwiftDriverTests/IntegrationTests.swift | 10 ++++++---- Tests/SwiftDriverTests/JobExecutorTests.swift | 10 ++++++---- .../ModuleDependencyGraphTests.swift | 10 ++++++---- .../MultidictionaryTests.swift | 10 ++++++---- .../NonincrementalCompilationTests.swift | 10 ++++++---- .../ParsableMessageTests.swift | 10 ++++++---- ...PredictableRandomNumberGeneratorTests.swift | 10 ++++++---- .../StringAdditionsTests.swift | 10 ++++++---- Tests/SwiftDriverTests/SwiftDriverTests.swift | 10 ++++++---- .../SwiftDriverToolingInterfaceTests.swift | 10 ++++++---- Tests/SwiftDriverTests/TripleTests.swift | 14 ++++++++------ Tests/SwiftDriverTests/TwoDMapTests.swift | 14 ++++++++------ .../SwiftOptionsTests/OptionParsingTests.swift | 10 ++++++---- Tests/TestUtilities/DriverExtensions.swift | 10 ++++++---- Tests/TestUtilities/Fixture.swift | 10 ++++++---- Tests/TestUtilities/OutputFileMapCreator.swift | 10 ++++++---- Tests/TestUtilities/PathExtensions.swift | 10 ++++++---- .../TestUtilities/TemporaryFileMatching.swift | 10 ++++++---- Tests/ToolingTestShim/CMakeLists.txt | 4 ++-- Tests/ToolingTestShim/include/tooling_shim.h | 10 ++++++---- Utilities/build-script-helper.py | 2 +- cmake/modules/FindLLBuild.cmake | 14 +++++++++----- 188 files changed, 1329 insertions(+), 976 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6781b886f..ebc26e64b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ -# This source file is part of the Swift.org open source project +# This source file is part of the Swift open source project # # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# Licensed under Apache License v2.0 # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors diff --git a/Sources/CMakeLists.txt b/Sources/CMakeLists.txt index 601d93e99..7c7a1c0e9 100644 --- a/Sources/CMakeLists.txt +++ b/Sources/CMakeLists.txt @@ -1,7 +1,7 @@ -# This source file is part of the Swift.org open source project +# This source file is part of the Swift open source project # # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# Licensed under Apache License v2.0 # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors diff --git a/Sources/CSwiftScan/CMakeLists.txt b/Sources/CSwiftScan/CMakeLists.txt index fea0189d4..9ef10c5d8 100644 --- a/Sources/CSwiftScan/CMakeLists.txt +++ b/Sources/CSwiftScan/CMakeLists.txt @@ -1,7 +1,7 @@ -# This source file is part of the Swift.org open source project +# This source file is part of the Swift open source project # # Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# Licensed under Apache License v2.0 # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors diff --git a/Sources/CSwiftScan/include/swiftscan_header.h b/Sources/CSwiftScan/include/swiftscan_header.h index 3f8a9c172..7a9f0cc38 100644 --- a/Sources/CSwiftScan/include/swiftscan_header.h +++ b/Sources/CSwiftScan/include/swiftscan_header.h @@ -1,13 +1,14 @@ //===-- swiftscan_header.h - C API for Swift Dependency Scanning --*- C -*-===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // +// SPDX-License-Identifier: Apache-2.0 //===----------------------------------------------------------------------===// #ifndef SWIFT_C_DEPENDENCY_SCAN_H diff --git a/Sources/SwiftDriver/CMakeLists.txt b/Sources/SwiftDriver/CMakeLists.txt index 8460f091d..f4295de96 100644 --- a/Sources/SwiftDriver/CMakeLists.txt +++ b/Sources/SwiftDriver/CMakeLists.txt @@ -1,7 +1,7 @@ -# This source file is part of the Swift.org open source project +# This source file is part of the Swift open source project # # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# Licensed under Apache License v2.0 # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors diff --git a/Sources/SwiftDriver/Driver/CompilerMode.swift b/Sources/SwiftDriver/Driver/CompilerMode.swift index 0304f07df..10a959153 100644 --- a/Sources/SwiftDriver/Driver/CompilerMode.swift +++ b/Sources/SwiftDriver/Driver/CompilerMode.swift @@ -1,12 +1,14 @@ -//===--------------- CompilerMode.swift - Swift Compiler Mode -------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// /// The mode of the compiler. diff --git a/Sources/SwiftDriver/Driver/DebugInfo.swift b/Sources/SwiftDriver/Driver/DebugInfo.swift index 2f8bdd859..028862a74 100644 --- a/Sources/SwiftDriver/Driver/DebugInfo.swift +++ b/Sources/SwiftDriver/Driver/DebugInfo.swift @@ -1,12 +1,14 @@ -//===--------------- DebugInfo.swift - Swift Debug Information ------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Driver/Driver.swift b/Sources/SwiftDriver/Driver/Driver.swift index 0703e8324..f4321fef4 100644 --- a/Sources/SwiftDriver/Driver/Driver.swift +++ b/Sources/SwiftDriver/Driver/Driver.swift @@ -1,12 +1,14 @@ -//===--------------- Driver.swift - Swift Driver --------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import SwiftOptions diff --git a/Sources/SwiftDriver/Driver/DriverVersion.swift b/Sources/SwiftDriver/Driver/DriverVersion.swift index 4346d2bfa..542d93099 100644 --- a/Sources/SwiftDriver/Driver/DriverVersion.swift +++ b/Sources/SwiftDriver/Driver/DriverVersion.swift @@ -1,12 +1,14 @@ -//===------ DriverVersion.swift - Swift Driver Source Version--------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// extension Driver { diff --git a/Sources/SwiftDriver/Driver/LinkKind.swift b/Sources/SwiftDriver/Driver/LinkKind.swift index b7c39ea95..9a399cc46 100644 --- a/Sources/SwiftDriver/Driver/LinkKind.swift +++ b/Sources/SwiftDriver/Driver/LinkKind.swift @@ -1,12 +1,14 @@ -//===--------------- LinkKind.swift - Swift Linking Kind ------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Driver/ModuleOutputInfo.swift b/Sources/SwiftDriver/Driver/ModuleOutputInfo.swift index ef5c2e82b..cf6b829a0 100644 --- a/Sources/SwiftDriver/Driver/ModuleOutputInfo.swift +++ b/Sources/SwiftDriver/Driver/ModuleOutputInfo.swift @@ -1,12 +1,14 @@ -//===--------------- ModuleOutputInfo.swift - Module output information ---===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Driver/OutputFileMap.swift b/Sources/SwiftDriver/Driver/OutputFileMap.swift index 2d7ed445d..cab44a490 100644 --- a/Sources/SwiftDriver/Driver/OutputFileMap.swift +++ b/Sources/SwiftDriver/Driver/OutputFileMap.swift @@ -1,12 +1,14 @@ -//===--------------- OutputFileMap.swift - Swift Output File Map ----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Driver/ToolExecutionDelegate.swift b/Sources/SwiftDriver/Driver/ToolExecutionDelegate.swift index df58363e8..1b63b4334 100644 --- a/Sources/SwiftDriver/Driver/ToolExecutionDelegate.swift +++ b/Sources/SwiftDriver/Driver/ToolExecutionDelegate.swift @@ -1,12 +1,14 @@ -//===--------------- ToolExecutionDelegate.swift - Tool Execution Delegate ===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Driver/WindowsExtensions.swift b/Sources/SwiftDriver/Driver/WindowsExtensions.swift index 84835c93c..820c72d5b 100644 --- a/Sources/SwiftDriver/Driver/WindowsExtensions.swift +++ b/Sources/SwiftDriver/Driver/WindowsExtensions.swift @@ -1,12 +1,14 @@ -//===------------- WindowsExtensions.swift - Windows Extensions -----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Execution/ArgsResolver.swift b/Sources/SwiftDriver/Execution/ArgsResolver.swift index c8315849c..144da1e08 100644 --- a/Sources/SwiftDriver/Execution/ArgsResolver.swift +++ b/Sources/SwiftDriver/Execution/ArgsResolver.swift @@ -1,12 +1,14 @@ -//===--------------- ArgsResolver.swift - Argument Resolution -------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Execution/DriverExecutor.swift b/Sources/SwiftDriver/Execution/DriverExecutor.swift index da1b3aaf6..8152a7080 100644 --- a/Sources/SwiftDriver/Execution/DriverExecutor.swift +++ b/Sources/SwiftDriver/Execution/DriverExecutor.swift @@ -1,12 +1,14 @@ -//===--------------- DriverExecutor.swift - Swift Driver Executor----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Execution/ParsableOutput.swift b/Sources/SwiftDriver/Execution/ParsableOutput.swift index 1e36bd311..7dab0c81f 100644 --- a/Sources/SwiftDriver/Execution/ParsableOutput.swift +++ b/Sources/SwiftDriver/Execution/ParsableOutput.swift @@ -1,12 +1,14 @@ -//===--------------- ParseableOutput.swift - Swift Parseable Output -------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Execution/ProcessProtocol.swift b/Sources/SwiftDriver/Execution/ProcessProtocol.swift index 86c61f8c0..e03ba7d89 100644 --- a/Sources/SwiftDriver/Execution/ProcessProtocol.swift +++ b/Sources/SwiftDriver/Execution/ProcessProtocol.swift @@ -1,12 +1,14 @@ -//===--------------- ProessProtocol.swift - Swift Subprocesses ------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Execution/ProcessSet.swift b/Sources/SwiftDriver/Execution/ProcessSet.swift index e7ef8d411..932267d5e 100644 --- a/Sources/SwiftDriver/Execution/ProcessSet.swift +++ b/Sources/SwiftDriver/Execution/ProcessSet.swift @@ -1,12 +1,14 @@ -//===--------------- ProcessSet.swift - Swift Subprocesses ---------------===// +//===----------------------------------------------------------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 +// +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/ExplicitModuleBuilds/ExplicitDependencyBuildPlanner.swift b/Sources/SwiftDriver/ExplicitModuleBuilds/ExplicitDependencyBuildPlanner.swift index 4aa3a5371..0b99e8e6d 100644 --- a/Sources/SwiftDriver/ExplicitModuleBuilds/ExplicitDependencyBuildPlanner.swift +++ b/Sources/SwiftDriver/ExplicitModuleBuilds/ExplicitDependencyBuildPlanner.swift @@ -1,12 +1,14 @@ -//===--------------- ExplicitDependencyBuildPlanner.swift ---------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/CommonDependencyOperations.swift b/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/CommonDependencyOperations.swift index 0629dc78c..33aff025f 100644 --- a/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/CommonDependencyOperations.swift +++ b/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/CommonDependencyOperations.swift @@ -1,12 +1,14 @@ //===----------------- CommonDependencyOperations.swift -------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyGraph.swift b/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyGraph.swift index 5925fec5e..c92f36e21 100644 --- a/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyGraph.swift +++ b/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyGraph.swift @@ -1,12 +1,14 @@ //===--------------- InterModuleDependencyGraph.swift ---------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyOracle.swift b/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyOracle.swift index 97829bba7..e3061aabb 100644 --- a/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyOracle.swift +++ b/Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyOracle.swift @@ -1,12 +1,14 @@ //===--------------- InterModuleDependencyOracle.swift --------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/ExplicitModuleBuilds/ModuleDependencyScanning.swift b/Sources/SwiftDriver/ExplicitModuleBuilds/ModuleDependencyScanning.swift index 0d5c2ea38..6c0fc1da6 100644 --- a/Sources/SwiftDriver/ExplicitModuleBuilds/ModuleDependencyScanning.swift +++ b/Sources/SwiftDriver/ExplicitModuleBuilds/ModuleDependencyScanning.swift @@ -1,12 +1,14 @@ -//===--------------- ModuleDependencyScanning.swift -----------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/ExplicitModuleBuilds/SerializableModuleArtifacts.swift b/Sources/SwiftDriver/ExplicitModuleBuilds/SerializableModuleArtifacts.swift index 4b62771a7..bd20d04f3 100644 --- a/Sources/SwiftDriver/ExplicitModuleBuilds/SerializableModuleArtifacts.swift +++ b/Sources/SwiftDriver/ExplicitModuleBuilds/SerializableModuleArtifacts.swift @@ -1,12 +1,14 @@ -//===--------------- SwiftModuleArtifacts.swift ---------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bitcode.swift b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bitcode.swift index f66833e3a..da33b5f8b 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bitcode.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bitcode.swift @@ -1,12 +1,14 @@ -//===--------------- BitCode.swift - LLVM BitCode Helpers ----------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitcodeElement.swift b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitcodeElement.swift index a65bea6cb..0a9064b34 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitcodeElement.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitcodeElement.swift @@ -1,12 +1,14 @@ -//===--------------- BitcodeElement.swift - LLVM Bitcode Elements --------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bits.swift b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bits.swift index 254ee2d8b..ebbaba6e7 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bits.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bits.swift @@ -1,12 +1,14 @@ -//===--------------- Bits.swift - Bitstream helpers ----------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bitstream.swift b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bitstream.swift index 83e6b49c7..692070555 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bitstream.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/Bitstream.swift @@ -1,12 +1,14 @@ -//===--------------- Bitstream.swift - LLVM Bitstream routines -----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamReader.swift b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamReader.swift index f672e45a6..aa09367ab 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamReader.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamReader.swift @@ -1,12 +1,14 @@ -//===--------------- BitstreamReader.swift - LLVM Bitstream Reader -------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamVisitor.swift b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamVisitor.swift index 33714884f..0438e192d 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamVisitor.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamVisitor.swift @@ -1,12 +1,14 @@ -//===----------- BitstreamVisitor.swift - LLVM Bitstream Visitor ----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamWriter.swift b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamWriter.swift index dacebe0ef..f21801e41 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamWriter.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BitstreamWriter.swift @@ -1,12 +1,14 @@ -//===----------- BistreamWriter.swift - LLVM Bitstream Writer -------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BlockInfo.swift b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BlockInfo.swift index fa10562ab..45ac36373 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BlockInfo.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/Bitcode/BlockInfo.swift @@ -1,12 +1,14 @@ -//===----------- BlockInfo.swift - LLVM Bitstream Block Info --------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/BuildRecord.swift b/Sources/SwiftDriver/IncrementalCompilation/BuildRecord.swift index ecab08a3d..146b4fc60 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/BuildRecord.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/BuildRecord.swift @@ -1,12 +1,14 @@ -//===--------------- BuildRecord.swift - Swift Input File Info Map -------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/BuildRecordInfo.swift b/Sources/SwiftDriver/IncrementalCompilation/BuildRecordInfo.swift index 7429ea16a..c55dc1fd2 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/BuildRecordInfo.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/BuildRecordInfo.swift @@ -1,12 +1,14 @@ -//===--------------- BuildRecordInfo.swift --------------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/DependencyGraphDotFileWriter.swift b/Sources/SwiftDriver/IncrementalCompilation/DependencyGraphDotFileWriter.swift index c404d90e6..a87217cdf 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/DependencyGraphDotFileWriter.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/DependencyGraphDotFileWriter.swift @@ -1,12 +1,14 @@ -//===---------- DependencyGraphDotFileWriter.swift - Swift GraphViz -------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/DependencyKey.swift b/Sources/SwiftDriver/IncrementalCompilation/DependencyKey.swift index b87533319..6f36e2f70 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/DependencyKey.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/DependencyKey.swift @@ -1,12 +1,14 @@ -//===------------------- DependencyKey.swift ------------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020-2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/DirectAndTransitiveCollections.swift b/Sources/SwiftDriver/IncrementalCompilation/DirectAndTransitiveCollections.swift index de6cbc150..e37024e09 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/DirectAndTransitiveCollections.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/DirectAndTransitiveCollections.swift @@ -1,12 +1,14 @@ -//===------------------ DirectAndTransitiveCollections.swift --------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/ExternalDependencyAndFingerprintEnforcer.swift b/Sources/SwiftDriver/IncrementalCompilation/ExternalDependencyAndFingerprintEnforcer.swift index 690280224..3f091eaff 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/ExternalDependencyAndFingerprintEnforcer.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/ExternalDependencyAndFingerprintEnforcer.swift @@ -1,12 +1,14 @@ -//===------- FingerprintedExternalHolder.swift ----------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/FirstWaveComputer.swift b/Sources/SwiftDriver/IncrementalCompilation/FirstWaveComputer.swift index a8a1147d4..f6a8eee61 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/FirstWaveComputer.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/FirstWaveComputer.swift @@ -1,12 +1,14 @@ -//===--------------- FirstWaveComputer.swift - Incremental --------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationProtectedState.swift b/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationProtectedState.swift index 4f07bca2e..21f0666a5 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationProtectedState.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationProtectedState.swift @@ -1,12 +1,14 @@ -//===---------- IncrementalCompilationActor.swift - Incremental -----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState+Extensions.swift b/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState+Extensions.swift index 60ff18615..e1fbc144f 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState+Extensions.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState+Extensions.swift @@ -1,12 +1,14 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState.swift b/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState.swift index e80764753..64f52a03d 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState.swift @@ -1,12 +1,14 @@ -//===--------------- IncrementalCompilation.swift - Incremental -----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationSynchronizer.swift b/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationSynchronizer.swift index 1e29fae0b..5a5367853 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationSynchronizer.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationSynchronizer.swift @@ -1,12 +1,14 @@ -//===---------------IncrementalCompilationSynchronizer.swift --------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift b/Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift index 6b4a10606..9d034739a 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift @@ -1,12 +1,14 @@ -//===----- IncrementalDependencyAndInputSetup.swift - Incremental --------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/InputInfo.swift b/Sources/SwiftDriver/IncrementalCompilation/InputInfo.swift index a3c351460..25b09cc0b 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/InputInfo.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/InputInfo.swift @@ -1,12 +1,14 @@ -//===--------------- InputInfo.swift - Swift Input File Info --------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/KeyAndFingerprintHolder.swift b/Sources/SwiftDriver/IncrementalCompilation/KeyAndFingerprintHolder.swift index 629630003..50e61837a 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/KeyAndFingerprintHolder.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/KeyAndFingerprintHolder.swift @@ -1,17 +1,17 @@ -//===--------- KeyAndFingerprintHolder.swift ------------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// - - /// Encapsulates the invariant required for anything with a DependencyKey and an fingerprint public struct KeyAndFingerprintHolder: ExternalDependencyAndFingerprintEnforcer, Equatable, Hashable diff --git a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraph.swift b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraph.swift index e539e47fb..ae72a695d 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraph.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraph.swift @@ -1,12 +1,14 @@ -//===------- ModuleDependencyGraph.swift ----------------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/DependencySource.swift b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/DependencySource.swift index 2967a8b1f..dc2759ceb 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/DependencySource.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/DependencySource.swift @@ -1,12 +1,14 @@ -//===------------------------ Node.swift ----------------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Integrator.swift b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Integrator.swift index 71a5e4c9e..aa2c56c1e 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Integrator.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Integrator.swift @@ -1,12 +1,14 @@ -//===------------------ Integrator.swift ----------------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/InternedStrings.swift b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/InternedStrings.swift index 6ef7dbe23..8e84bede6 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/InternedStrings.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/InternedStrings.swift @@ -1,12 +1,14 @@ -//===------------------ InteredStrings.swift ------------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Node.swift b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Node.swift index 2cec31e3d..6f15a6639 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Node.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Node.swift @@ -1,12 +1,14 @@ -//===------------------------ Node.swift ----------------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/NodeFinder.swift b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/NodeFinder.swift index 629618372..7316cb2a5 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/NodeFinder.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/NodeFinder.swift @@ -1,12 +1,14 @@ -//===-------------------- NodeFinder.swift --------------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Tracer.swift b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Tracer.swift index 6bd8fc8f9..1ff72e89f 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Tracer.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Tracer.swift @@ -1,12 +1,14 @@ -//===----------------------------- Tracer.swift ---------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/Multidictionary.swift b/Sources/SwiftDriver/IncrementalCompilation/Multidictionary.swift index bcc0ddbf9..ec3c466e6 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/Multidictionary.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/Multidictionary.swift @@ -1,12 +1,14 @@ -//===------------------------- Multidictionary.swift ----------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020-2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/SourceFileDependencyGraph.swift b/Sources/SwiftDriver/IncrementalCompilation/SourceFileDependencyGraph.swift index a069c8db2..4243e2730 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/SourceFileDependencyGraph.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/SourceFileDependencyGraph.swift @@ -1,12 +1,14 @@ -//===---SourceFileDependencyGraph.swift - Read swiftdeps or swiftmodule files ---===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/SwiftSourceFile.swift b/Sources/SwiftDriver/IncrementalCompilation/SwiftSourceFile.swift index c502a87b6..e97280269 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/SwiftSourceFile.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/SwiftSourceFile.swift @@ -1,12 +1,14 @@ -//===-------------------- SwiftSourceFile.swift - Incremental -------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/TwoDMap.swift b/Sources/SwiftDriver/IncrementalCompilation/TwoDMap.swift index 93668e6b5..09aaa1a2f 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/TwoDMap.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/TwoDMap.swift @@ -1,12 +1,14 @@ -//===---------------- TwoDMap.swift ---------------------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/IncrementalCompilation/TwoLevelMap.swift b/Sources/SwiftDriver/IncrementalCompilation/TwoLevelMap.swift index 2a87d4035..14b414606 100644 --- a/Sources/SwiftDriver/IncrementalCompilation/TwoLevelMap.swift +++ b/Sources/SwiftDriver/IncrementalCompilation/TwoLevelMap.swift @@ -1,12 +1,14 @@ -//===----------------------- TwoLevelMap.swift ----------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/APIDigesterJobs.swift b/Sources/SwiftDriver/Jobs/APIDigesterJobs.swift index 7be2442a3..123b66a78 100644 --- a/Sources/SwiftDriver/Jobs/APIDigesterJobs.swift +++ b/Sources/SwiftDriver/Jobs/APIDigesterJobs.swift @@ -1,12 +1,14 @@ -//===- APIDigesterJobs.swift - Baseline Generation and API/ABI Comparison -===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/AutolinkExtractJob.swift b/Sources/SwiftDriver/Jobs/AutolinkExtractJob.swift index c7ed8558a..2a62d4339 100644 --- a/Sources/SwiftDriver/Jobs/AutolinkExtractJob.swift +++ b/Sources/SwiftDriver/Jobs/AutolinkExtractJob.swift @@ -1,12 +1,14 @@ -//===--------------- AutolinkExtractJob.swift - Swift Autolink Extract ----===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/CommandLineArguments.swift b/Sources/SwiftDriver/Jobs/CommandLineArguments.swift index 821191251..e73bfd8d4 100644 --- a/Sources/SwiftDriver/Jobs/CommandLineArguments.swift +++ b/Sources/SwiftDriver/Jobs/CommandLineArguments.swift @@ -1,12 +1,14 @@ -//===--- CommandLineArguments.swift - Command Line Argument Manipulation --===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/CompileJob.swift b/Sources/SwiftDriver/Jobs/CompileJob.swift index 7a19daaca..da7a3b65a 100644 --- a/Sources/SwiftDriver/Jobs/CompileJob.swift +++ b/Sources/SwiftDriver/Jobs/CompileJob.swift @@ -1,12 +1,14 @@ -//===--------------- CompileJob.swift - Swift Compilation Job -------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/DarwinToolchain+LinkerSupport.swift b/Sources/SwiftDriver/Jobs/DarwinToolchain+LinkerSupport.swift index 906c29313..b402f3902 100644 --- a/Sources/SwiftDriver/Jobs/DarwinToolchain+LinkerSupport.swift +++ b/Sources/SwiftDriver/Jobs/DarwinToolchain+LinkerSupport.swift @@ -1,12 +1,14 @@ -//===--------------- DarwinToolchain+LinkerSupport.swift ------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/EmitModuleJob.swift b/Sources/SwiftDriver/Jobs/EmitModuleJob.swift index 6de179a08..30b5c97ca 100644 --- a/Sources/SwiftDriver/Jobs/EmitModuleJob.swift +++ b/Sources/SwiftDriver/Jobs/EmitModuleJob.swift @@ -1,12 +1,14 @@ -//===--------------- EmitModuleJob.swift - Swift Module Emission Job ------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/EmitSupportedFeaturesJob.swift b/Sources/SwiftDriver/Jobs/EmitSupportedFeaturesJob.swift index e7f276bf1..3bf4414e9 100644 --- a/Sources/SwiftDriver/Jobs/EmitSupportedFeaturesJob.swift +++ b/Sources/SwiftDriver/Jobs/EmitSupportedFeaturesJob.swift @@ -1,14 +1,16 @@ -//===---- EmitSupportedFeatures.swift - Swift Compiler Features Info Job ----===// +//===----------------------------------------------------------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -//===----------------------------------------------------------------------===//// +// SPDX-License-Identifier: Apache-2.0 +// +//===----------------------------------------------------------------------===// import SwiftOptions import struct Foundation.Data diff --git a/Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift b/Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift index acb44c74d..0dd8703b9 100644 --- a/Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift +++ b/Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift @@ -1,12 +1,14 @@ -//===--------------- FrontendJobHelpers.swift - Swift Frontend Job Common -===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/GenerateDSYMJob.swift b/Sources/SwiftDriver/Jobs/GenerateDSYMJob.swift index 248262b2b..e8e2d2493 100644 --- a/Sources/SwiftDriver/Jobs/GenerateDSYMJob.swift +++ b/Sources/SwiftDriver/Jobs/GenerateDSYMJob.swift @@ -1,12 +1,14 @@ -//===--------------- GenerateDSYMJob.swift - Swift dSYM Generation --------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/GeneratePCHJob.swift b/Sources/SwiftDriver/Jobs/GeneratePCHJob.swift index 2d70cd22d..ba7a6e067 100644 --- a/Sources/SwiftDriver/Jobs/GeneratePCHJob.swift +++ b/Sources/SwiftDriver/Jobs/GeneratePCHJob.swift @@ -1,12 +1,14 @@ -//===--------------- GeneratePCHJob.swift - Generate PCH Job ----===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/GeneratePCMJob.swift b/Sources/SwiftDriver/Jobs/GeneratePCMJob.swift index 1014bd612..64edfe395 100644 --- a/Sources/SwiftDriver/Jobs/GeneratePCMJob.swift +++ b/Sources/SwiftDriver/Jobs/GeneratePCMJob.swift @@ -1,12 +1,14 @@ -//===--------------- GeneratePCMJob.swift - Generate PCM Job ----===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift b/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift index fa2bd8132..7a0228eed 100644 --- a/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift +++ b/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift @@ -1,12 +1,14 @@ -//===--------------- GenericUnixToolchain+LinkerSupport.swift -------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/InterpretJob.swift b/Sources/SwiftDriver/Jobs/InterpretJob.swift index aebf5e487..437303516 100644 --- a/Sources/SwiftDriver/Jobs/InterpretJob.swift +++ b/Sources/SwiftDriver/Jobs/InterpretJob.swift @@ -1,12 +1,14 @@ -//===--------------- InterpretJob.swift - Swift Immediate Mode ------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/Job.swift b/Sources/SwiftDriver/Jobs/Job.swift index 0f0c52c07..c5d3b665a 100644 --- a/Sources/SwiftDriver/Jobs/Job.swift +++ b/Sources/SwiftDriver/Jobs/Job.swift @@ -1,12 +1,14 @@ -//===--------------- Job.swift - Swift Job Abstraction --------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/LinkJob.swift b/Sources/SwiftDriver/Jobs/LinkJob.swift index afc599ec4..728ad2da0 100644 --- a/Sources/SwiftDriver/Jobs/LinkJob.swift +++ b/Sources/SwiftDriver/Jobs/LinkJob.swift @@ -1,12 +1,14 @@ -//===--------------- LinkJob.swift - Swift Linking Job --------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/ModuleWrapJob.swift b/Sources/SwiftDriver/Jobs/ModuleWrapJob.swift index 9402d26f6..8d35c5bc1 100644 --- a/Sources/SwiftDriver/Jobs/ModuleWrapJob.swift +++ b/Sources/SwiftDriver/Jobs/ModuleWrapJob.swift @@ -1,12 +1,14 @@ -//===--------------- ModuleWrapJob.swift - Swift Module Wrapping ----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/Planning.swift b/Sources/SwiftDriver/Jobs/Planning.swift index a9b691f7b..a851fa803 100644 --- a/Sources/SwiftDriver/Jobs/Planning.swift +++ b/Sources/SwiftDriver/Jobs/Planning.swift @@ -1,12 +1,14 @@ -//===--------------- Planning.swift - Swift Compilation Planning ----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/PrebuiltModulesJob.swift b/Sources/SwiftDriver/Jobs/PrebuiltModulesJob.swift index 86b3b46dc..92c52a5df 100644 --- a/Sources/SwiftDriver/Jobs/PrebuiltModulesJob.swift +++ b/Sources/SwiftDriver/Jobs/PrebuiltModulesJob.swift @@ -1,12 +1,14 @@ -//===----- PrebuiltModulesJob.swift - Swit prebuilt module Planning -------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import SwiftOptions diff --git a/Sources/SwiftDriver/Jobs/PrintSupportedFeaturesJob.swift b/Sources/SwiftDriver/Jobs/PrintSupportedFeaturesJob.swift index 0c7993e33..b3681d10a 100644 --- a/Sources/SwiftDriver/Jobs/PrintSupportedFeaturesJob.swift +++ b/Sources/SwiftDriver/Jobs/PrintSupportedFeaturesJob.swift @@ -1,12 +1,14 @@ -//===------- PrintSupportedFeaturesJob.swift - Swift Target Info Job ------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2025 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/PrintTargetInfoJob.swift b/Sources/SwiftDriver/Jobs/PrintTargetInfoJob.swift index 8a476cf0a..247e4f70f 100644 --- a/Sources/SwiftDriver/Jobs/PrintTargetInfoJob.swift +++ b/Sources/SwiftDriver/Jobs/PrintTargetInfoJob.swift @@ -1,12 +1,14 @@ -//===----------- PrintTargetInfoJob.swift - Swift Target Info Job ---------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/ReplJob.swift b/Sources/SwiftDriver/Jobs/ReplJob.swift index 5f7c24d9e..b8e98b1c5 100644 --- a/Sources/SwiftDriver/Jobs/ReplJob.swift +++ b/Sources/SwiftDriver/Jobs/ReplJob.swift @@ -1,12 +1,14 @@ -//===--------------- ReplJob.swift - Swift REPL ---------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/SwiftHelpIntroJob.swift b/Sources/SwiftDriver/Jobs/SwiftHelpIntroJob.swift index 51c6f766c..cb3d62762 100644 --- a/Sources/SwiftDriver/Jobs/SwiftHelpIntroJob.swift +++ b/Sources/SwiftDriver/Jobs/SwiftHelpIntroJob.swift @@ -1,12 +1,14 @@ -//===--------------- SwiftHelpIntroJob.swift - Swift REPL -----------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import SwiftOptions diff --git a/Sources/SwiftDriver/Jobs/Toolchain+InterpreterSupport.swift b/Sources/SwiftDriver/Jobs/Toolchain+InterpreterSupport.swift index 91f6ed7f8..edb29b064 100644 --- a/Sources/SwiftDriver/Jobs/Toolchain+InterpreterSupport.swift +++ b/Sources/SwiftDriver/Jobs/Toolchain+InterpreterSupport.swift @@ -1,12 +1,14 @@ -//===----- Toolchain+InterpreterSupport.swift - Swift Interpreter Support -===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift b/Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift index f2fad3ad0..80efeee2a 100644 --- a/Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift +++ b/Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift @@ -1,12 +1,14 @@ -//===--------------- Toolchain+LinkerSupport.swift - Swift Linker Support -===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/VerifyDebugInfoJob.swift b/Sources/SwiftDriver/Jobs/VerifyDebugInfoJob.swift index 3b1c42a25..a881b5da1 100644 --- a/Sources/SwiftDriver/Jobs/VerifyDebugInfoJob.swift +++ b/Sources/SwiftDriver/Jobs/VerifyDebugInfoJob.swift @@ -1,12 +1,14 @@ -//===------- VerifyDebugInfoJob.swift - Swift Debug Info Verification -----===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/VerifyModuleInterfaceJob.swift b/Sources/SwiftDriver/Jobs/VerifyModuleInterfaceJob.swift index 3ba4009a1..179f33975 100644 --- a/Sources/SwiftDriver/Jobs/VerifyModuleInterfaceJob.swift +++ b/Sources/SwiftDriver/Jobs/VerifyModuleInterfaceJob.swift @@ -1,12 +1,14 @@ -//===- VerifyModuleInterface.swift - Swift Module Interface Verification --===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/WebAssemblyToolchain+LinkerSupport.swift b/Sources/SwiftDriver/Jobs/WebAssemblyToolchain+LinkerSupport.swift index 4dc47ea4d..e93125d94 100644 --- a/Sources/SwiftDriver/Jobs/WebAssemblyToolchain+LinkerSupport.swift +++ b/Sources/SwiftDriver/Jobs/WebAssemblyToolchain+LinkerSupport.swift @@ -1,12 +1,14 @@ -//===--------------- WebAssemblyToolchain+LinkerSupport.swift -------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Jobs/WindowsToolchain+LinkerSupport.swift b/Sources/SwiftDriver/Jobs/WindowsToolchain+LinkerSupport.swift index eae53e381..7caed58bb 100644 --- a/Sources/SwiftDriver/Jobs/WindowsToolchain+LinkerSupport.swift +++ b/Sources/SwiftDriver/Jobs/WindowsToolchain+LinkerSupport.swift @@ -1,12 +1,14 @@ -//===--------------- WindowsToolchain+LinkerSupport.swift -----------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/SwiftScan/DependencyGraphBuilder.swift b/Sources/SwiftDriver/SwiftScan/DependencyGraphBuilder.swift index 6113cee4e..e0b4f2417 100644 --- a/Sources/SwiftDriver/SwiftScan/DependencyGraphBuilder.swift +++ b/Sources/SwiftDriver/SwiftScan/DependencyGraphBuilder.swift @@ -1,12 +1,14 @@ -//===--- DependencyGraphBuilder.swift -------------------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/SwiftScan/Loader.swift b/Sources/SwiftDriver/SwiftScan/Loader.swift index 849dfb72c..b9dbeea49 100644 --- a/Sources/SwiftDriver/SwiftScan/Loader.swift +++ b/Sources/SwiftDriver/SwiftScan/Loader.swift @@ -1,12 +1,14 @@ -//===------------------------ Loader.swift -------------------------------===// +//===----------------------------------------------------------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 +// +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/SwiftScan/SwiftScan.swift b/Sources/SwiftDriver/SwiftScan/SwiftScan.swift index 32d10514c..fae062fa6 100644 --- a/Sources/SwiftDriver/SwiftScan/SwiftScan.swift +++ b/Sources/SwiftDriver/SwiftScan/SwiftScan.swift @@ -1,12 +1,14 @@ -//===------------------------ SwiftScan.swift -----------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/SwiftScan/SwiftScanCAS.swift b/Sources/SwiftDriver/SwiftScan/SwiftScanCAS.swift index 188c26ed9..e7b252966 100644 --- a/Sources/SwiftDriver/SwiftScan/SwiftScanCAS.swift +++ b/Sources/SwiftDriver/SwiftScan/SwiftScanCAS.swift @@ -1,12 +1,14 @@ -//===------------------------ SwiftScanCAS.swift --------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Toolchains/DarwinToolchain.swift b/Sources/SwiftDriver/Toolchains/DarwinToolchain.swift index 2277bb2d0..a8f8cb34a 100644 --- a/Sources/SwiftDriver/Toolchains/DarwinToolchain.swift +++ b/Sources/SwiftDriver/Toolchains/DarwinToolchain.swift @@ -1,12 +1,14 @@ -//===--------------- DarwinToolchain.swift - Swift Darwin Toolchain -------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Toolchains/GenericUnixToolchain.swift b/Sources/SwiftDriver/Toolchains/GenericUnixToolchain.swift index fc241bd96..fb66662a6 100644 --- a/Sources/SwiftDriver/Toolchains/GenericUnixToolchain.swift +++ b/Sources/SwiftDriver/Toolchains/GenericUnixToolchain.swift @@ -1,12 +1,14 @@ -//===--------------- GenericUnixToolchain.swift - Swift *nix Toolchain ----===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Toolchains/Toolchain.swift b/Sources/SwiftDriver/Toolchains/Toolchain.swift index e366bde6e..6b4f808c6 100644 --- a/Sources/SwiftDriver/Toolchains/Toolchain.swift +++ b/Sources/SwiftDriver/Toolchains/Toolchain.swift @@ -1,12 +1,14 @@ -//===--------------- Toolchain.swift - Swift Toolchain Abstraction --------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Toolchains/WebAssemblyToolchain.swift b/Sources/SwiftDriver/Toolchains/WebAssemblyToolchain.swift index db95a4f5e..6562009d7 100644 --- a/Sources/SwiftDriver/Toolchains/WebAssemblyToolchain.swift +++ b/Sources/SwiftDriver/Toolchains/WebAssemblyToolchain.swift @@ -1,12 +1,14 @@ -//===-------- WebAssemblyToolchain.swift - Swift Wasm Toolchain -----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Toolchains/WindowsToolchain.swift b/Sources/SwiftDriver/Toolchains/WindowsToolchain.swift index d9e341c8c..e13a66362 100644 --- a/Sources/SwiftDriver/Toolchains/WindowsToolchain.swift +++ b/Sources/SwiftDriver/Toolchains/WindowsToolchain.swift @@ -1,12 +1,14 @@ -//===----------- WindowsToolchain.swift - Swift Windows Toolchain ---------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/ToolingInterface/SimpleExecutor.swift b/Sources/SwiftDriver/ToolingInterface/SimpleExecutor.swift index 0ca64cac2..adad5c6a6 100644 --- a/Sources/SwiftDriver/ToolingInterface/SimpleExecutor.swift +++ b/Sources/SwiftDriver/ToolingInterface/SimpleExecutor.swift @@ -1,12 +1,14 @@ -//===------- SimpleExecutor.swift - Swift Driver Source Version-----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/ToolingInterface/ToolingUtil.swift b/Sources/SwiftDriver/ToolingInterface/ToolingUtil.swift index 6bd878ed5..e1c67be7a 100644 --- a/Sources/SwiftDriver/ToolingInterface/ToolingUtil.swift +++ b/Sources/SwiftDriver/ToolingInterface/ToolingUtil.swift @@ -1,12 +1,14 @@ -//===------- ToolingUtil.swift - Swift Driver Source Version--------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/DOTJobGraphSerializer.swift b/Sources/SwiftDriver/Utilities/DOTJobGraphSerializer.swift index 17b7390b0..8cf3e92bf 100644 --- a/Sources/SwiftDriver/Utilities/DOTJobGraphSerializer.swift +++ b/Sources/SwiftDriver/Utilities/DOTJobGraphSerializer.swift @@ -1,12 +1,14 @@ -//===--------------- DOTJobGraphSerializer.swift - Swift GraphViz ---------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/DOTModuleDependencyGraphSerializer.swift b/Sources/SwiftDriver/Utilities/DOTModuleDependencyGraphSerializer.swift index 823e49926..8ed89a5e0 100644 --- a/Sources/SwiftDriver/Utilities/DOTModuleDependencyGraphSerializer.swift +++ b/Sources/SwiftDriver/Utilities/DOTModuleDependencyGraphSerializer.swift @@ -1,12 +1,14 @@ -//===----------- DOTModuleDependencyGraphSerializer.swift - Swift ---------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import TSCBasic diff --git a/Sources/SwiftDriver/Utilities/DateAdditions.swift b/Sources/SwiftDriver/Utilities/DateAdditions.swift index 589df0fe2..48311b775 100644 --- a/Sources/SwiftDriver/Utilities/DateAdditions.swift +++ b/Sources/SwiftDriver/Utilities/DateAdditions.swift @@ -1,12 +1,14 @@ -//===--------------- DateAdditions.swift - Swift Date Additions -----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/Diagnostics.swift b/Sources/SwiftDriver/Utilities/Diagnostics.swift index 8b41e2d05..75c73a20b 100644 --- a/Sources/SwiftDriver/Utilities/Diagnostics.swift +++ b/Sources/SwiftDriver/Utilities/Diagnostics.swift @@ -1,12 +1,14 @@ -//===--------------- Diagnostics.swift - Swift Driver Diagnostics ---------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/FileList.swift b/Sources/SwiftDriver/Utilities/FileList.swift index 92f465561..ca1a53746 100644 --- a/Sources/SwiftDriver/Utilities/FileList.swift +++ b/Sources/SwiftDriver/Utilities/FileList.swift @@ -1,12 +1,14 @@ -//===--------------- FileList.swift - File list model ---------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/FileMetadata.swift b/Sources/SwiftDriver/Utilities/FileMetadata.swift index 2b9bfbe5b..4b7a38fe7 100644 --- a/Sources/SwiftDriver/Utilities/FileMetadata.swift +++ b/Sources/SwiftDriver/Utilities/FileMetadata.swift @@ -1,12 +1,14 @@ -//===--------------- Driver.swift - Swift Driver --------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/FileType.swift b/Sources/SwiftDriver/Utilities/FileType.swift index db5d455d3..b6eb49454 100644 --- a/Sources/SwiftDriver/Utilities/FileType.swift +++ b/Sources/SwiftDriver/Utilities/FileType.swift @@ -1,12 +1,14 @@ -//===--------------- FileType.swift - Swift File Types --------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/PredictableRandomNumberGenerator.swift b/Sources/SwiftDriver/Utilities/PredictableRandomNumberGenerator.swift index 3448a66b7..eff717df8 100644 --- a/Sources/SwiftDriver/Utilities/PredictableRandomNumberGenerator.swift +++ b/Sources/SwiftDriver/Utilities/PredictableRandomNumberGenerator.swift @@ -1,12 +1,14 @@ -//===------------ PredictableRandomNumberGenerator.swift ------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/PythonArchitecture.swift b/Sources/SwiftDriver/Utilities/PythonArchitecture.swift index 575b9394c..ed51713d9 100644 --- a/Sources/SwiftDriver/Utilities/PythonArchitecture.swift +++ b/Sources/SwiftDriver/Utilities/PythonArchitecture.swift @@ -1,12 +1,14 @@ -//===--------------- Driver.swift - Swift Driver --------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import Foundation diff --git a/Sources/SwiftDriver/Utilities/RelativePathAdditions.swift b/Sources/SwiftDriver/Utilities/RelativePathAdditions.swift index 3f366ab90..bd5712993 100644 --- a/Sources/SwiftDriver/Utilities/RelativePathAdditions.swift +++ b/Sources/SwiftDriver/Utilities/RelativePathAdditions.swift @@ -1,12 +1,14 @@ -//===--------------- RelativePathAdditions.swift - Swift Relative Paths ---===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/Sanitizer.swift b/Sources/SwiftDriver/Utilities/Sanitizer.swift index 33f84c832..79f19fcb7 100644 --- a/Sources/SwiftDriver/Utilities/Sanitizer.swift +++ b/Sources/SwiftDriver/Utilities/Sanitizer.swift @@ -1,12 +1,14 @@ -//===--------------- Sanitizer.swift - Swift Sanitizers -------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/StringAdditions.swift b/Sources/SwiftDriver/Utilities/StringAdditions.swift index c84bd982a..c22b28f81 100644 --- a/Sources/SwiftDriver/Utilities/StringAdditions.swift +++ b/Sources/SwiftDriver/Utilities/StringAdditions.swift @@ -1,12 +1,14 @@ -//===--------------- StringAdditions.swift - Swift String Additions -------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// extension String { diff --git a/Sources/SwiftDriver/Utilities/System.swift b/Sources/SwiftDriver/Utilities/System.swift index f39157e38..d039d8855 100644 --- a/Sources/SwiftDriver/Utilities/System.swift +++ b/Sources/SwiftDriver/Utilities/System.swift @@ -1,12 +1,14 @@ -//===------------ System.swift - Swift Driver System Utilities ------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/Triple+Platforms.swift b/Sources/SwiftDriver/Utilities/Triple+Platforms.swift index 65b1488e0..99026609d 100644 --- a/Sources/SwiftDriver/Utilities/Triple+Platforms.swift +++ b/Sources/SwiftDriver/Utilities/Triple+Platforms.swift @@ -1,12 +1,14 @@ -//===--------------- Triple+Platforms.swift - Swift Platform Triples ------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/Triple.swift b/Sources/SwiftDriver/Utilities/Triple.swift index c021899b7..a8417f25f 100644 --- a/Sources/SwiftDriver/Utilities/Triple.swift +++ b/Sources/SwiftDriver/Utilities/Triple.swift @@ -1,12 +1,14 @@ -//===--------------- Triple.swift - Swift Target Triples ------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/TypedVirtualPath.swift b/Sources/SwiftDriver/Utilities/TypedVirtualPath.swift index c5392d641..79f92d9a9 100644 --- a/Sources/SwiftDriver/Utilities/TypedVirtualPath.swift +++ b/Sources/SwiftDriver/Utilities/TypedVirtualPath.swift @@ -1,12 +1,14 @@ -//===--------------- TypedVirtualPath.swift - Swift Virtual Paths ---------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// /// A path for which the type of the input is known. diff --git a/Sources/SwiftDriver/Utilities/Version.swift b/Sources/SwiftDriver/Utilities/Version.swift index 617157b7a..14727b8a0 100644 --- a/Sources/SwiftDriver/Utilities/Version.swift +++ b/Sources/SwiftDriver/Utilities/Version.swift @@ -1,12 +1,14 @@ -//===--------------- Version.swift - Version Handling Routines ------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriver/Utilities/VirtualPath.swift b/Sources/SwiftDriver/Utilities/VirtualPath.swift index 6746d11d1..bfaad4156 100644 --- a/Sources/SwiftDriver/Utilities/VirtualPath.swift +++ b/Sources/SwiftDriver/Utilities/VirtualPath.swift @@ -1,12 +1,14 @@ -//===--------------- VirtualPath.swift - Swift Virtual Paths --------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriverExecution/CMakeLists.txt b/Sources/SwiftDriverExecution/CMakeLists.txt index 9583c3133..82835cf6c 100644 --- a/Sources/SwiftDriverExecution/CMakeLists.txt +++ b/Sources/SwiftDriverExecution/CMakeLists.txt @@ -1,7 +1,7 @@ -# This source file is part of the Swift.org open source project +# This source file is part of the Swift open source project # # Copyright (c) 2020 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# Licensed under Apache License v2.0 # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors diff --git a/Sources/SwiftDriverExecution/MultiJobExecutor.swift b/Sources/SwiftDriverExecution/MultiJobExecutor.swift index 0ce69614a..2926f0a6a 100644 --- a/Sources/SwiftDriverExecution/MultiJobExecutor.swift +++ b/Sources/SwiftDriverExecution/MultiJobExecutor.swift @@ -1,12 +1,14 @@ -//===------- MultiJobExecutor.swift - LLBuild-powered job executor --------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriverExecution/SwiftDriverExecutor.swift b/Sources/SwiftDriverExecution/SwiftDriverExecutor.swift index 80b1370fe..19c00ccb6 100644 --- a/Sources/SwiftDriverExecution/SwiftDriverExecutor.swift +++ b/Sources/SwiftDriverExecution/SwiftDriverExecutor.swift @@ -1,12 +1,14 @@ -//===- SwiftDriverExecutor.swift - Builtin DriverExecutor implementation --===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftDriverExecution/llbuild.swift b/Sources/SwiftDriverExecution/llbuild.swift index 85f8a70ad..34d0e49b9 100644 --- a/Sources/SwiftDriverExecution/llbuild.swift +++ b/Sources/SwiftDriverExecution/llbuild.swift @@ -1,12 +1,14 @@ -//===--------------- llbuild.swift - Swift LLBuild Interaction ------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftOptions/CMakeLists.txt b/Sources/SwiftOptions/CMakeLists.txt index c62626826..3dcbedc2d 100644 --- a/Sources/SwiftOptions/CMakeLists.txt +++ b/Sources/SwiftOptions/CMakeLists.txt @@ -1,7 +1,7 @@ -# This source file is part of the Swift.org open source project +# This source file is part of the Swift open source project # # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# Licensed under Apache License v2.0 # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors diff --git a/Sources/SwiftOptions/DriverKind.swift b/Sources/SwiftOptions/DriverKind.swift index b4afb622d..17147e8ba 100644 --- a/Sources/SwiftOptions/DriverKind.swift +++ b/Sources/SwiftOptions/DriverKind.swift @@ -1,12 +1,14 @@ -//===--------------- DriverKind.swift - Swift Driver Kind -----------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftOptions/Option.swift b/Sources/SwiftOptions/Option.swift index a2a0b6dc1..af4f86004 100644 --- a/Sources/SwiftOptions/Option.swift +++ b/Sources/SwiftOptions/Option.swift @@ -1,12 +1,14 @@ -//===--------------- Option.swift - Swift Command Line Option -------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// /// Attributes that describe where and how the option is used. diff --git a/Sources/SwiftOptions/OptionParsing.swift b/Sources/SwiftOptions/OptionParsing.swift index a434e5947..513ecf5d1 100644 --- a/Sources/SwiftOptions/OptionParsing.swift +++ b/Sources/SwiftOptions/OptionParsing.swift @@ -1,12 +1,14 @@ -//===--------------- OptionParsing.swift - Swift Option Parser ------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftOptions/OptionTable.swift b/Sources/SwiftOptions/OptionTable.swift index 6e22e2e5f..0d33bc30c 100644 --- a/Sources/SwiftOptions/OptionTable.swift +++ b/Sources/SwiftOptions/OptionTable.swift @@ -1,12 +1,14 @@ -//===--------------- OptionTable.swift - Swift Option Table ---------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// public struct OptionTable { diff --git a/Sources/SwiftOptions/Options.swift b/Sources/SwiftOptions/Options.swift index 317d3ed00..dacf33599 100644 --- a/Sources/SwiftOptions/Options.swift +++ b/Sources/SwiftOptions/Options.swift @@ -1,12 +1,14 @@ //===--------------- Options.swift - Swift Driver Options -----------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// // diff --git a/Sources/SwiftOptions/ParsedOptions.swift b/Sources/SwiftOptions/ParsedOptions.swift index 6cf27266b..486c620c9 100644 --- a/Sources/SwiftOptions/ParsedOptions.swift +++ b/Sources/SwiftOptions/ParsedOptions.swift @@ -1,12 +1,14 @@ -//===--------------- ParsedOptions.swift - Swift Parsed Options -----------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/SwiftOptions/PrefixTrie.swift b/Sources/SwiftOptions/PrefixTrie.swift index ed574d71c..5a7286ec6 100644 --- a/Sources/SwiftOptions/PrefixTrie.swift +++ b/Sources/SwiftOptions/PrefixTrie.swift @@ -1,12 +1,14 @@ -//==------------------ PrefixTrie.swift - Prefix Trie ---------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Sources/makeOptions/CMakeLists.txt b/Sources/makeOptions/CMakeLists.txt index 3dccbe1fd..961cdc6e9 100644 --- a/Sources/makeOptions/CMakeLists.txt +++ b/Sources/makeOptions/CMakeLists.txt @@ -1,7 +1,7 @@ -# This source file is part of the Swift.org open source project +# This source file is part of the Swift open source project # # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# Licensed under Apache License v2.0 # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors diff --git a/Sources/makeOptions/main.cpp b/Sources/makeOptions/main.cpp index d594496db..5872d3594 100644 --- a/Sources/makeOptions/main.cpp +++ b/Sources/makeOptions/main.cpp @@ -1,12 +1,14 @@ //===--------------- main.cpp - Option Generation Main Entrypoint ---------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// extern int makeOptions_main(); diff --git a/Sources/makeOptions/makeOptions.cpp b/Sources/makeOptions/makeOptions.cpp index 411e5650d..688883699 100644 --- a/Sources/makeOptions/makeOptions.cpp +++ b/Sources/makeOptions/makeOptions.cpp @@ -1,12 +1,14 @@ //===--------------- makeOptions.cpp - Option Generation ------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// #include @@ -217,13 +219,13 @@ int makeOptions_main() { out << "//===--------------- Options.swift - Swift Driver Options -----------------===//\n" "//\n" - "// This source file is part of the Swift.org open source project\n" + "// This source file is part of the Swift open source project\n" "//\n" "// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors\n" - "// Licensed under Apache License v2.0 with Runtime Library Exception\n" + "// Licensed under Apache License v2.0\n" "//\n" - "// See https://swift.org/LICENSE.txt for license information\n" - "// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors\n" + "// See LICENSE.txt for license information\n" + "// See CONTRIBUTORS.txt for the list of Swift project authors\n" "//\n" "//===----------------------------------------------------------------------===//\n" "//\n" diff --git a/Sources/swift-build-sdk-interfaces/CMakeLists.txt b/Sources/swift-build-sdk-interfaces/CMakeLists.txt index 12b014d33..ee40b258e 100644 --- a/Sources/swift-build-sdk-interfaces/CMakeLists.txt +++ b/Sources/swift-build-sdk-interfaces/CMakeLists.txt @@ -1,7 +1,7 @@ -# This source file is part of the Swift.org open source project +# This source file is part of the Swift open source project # # Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# Licensed under Apache License v2.0 # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors diff --git a/Sources/swift-build-sdk-interfaces/main.swift b/Sources/swift-build-sdk-interfaces/main.swift index 72264a385..b1fdbbcde 100644 --- a/Sources/swift-build-sdk-interfaces/main.swift +++ b/Sources/swift-build-sdk-interfaces/main.swift @@ -1,14 +1,17 @@ -//===--------------- main.swift - swift-build-sdk-interfaces ------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// + import SwiftDriverExecution import SwiftDriver #if os(Windows) diff --git a/Sources/swift-driver/CMakeLists.txt b/Sources/swift-driver/CMakeLists.txt index 110fe48a2..b6276121b 100644 --- a/Sources/swift-driver/CMakeLists.txt +++ b/Sources/swift-driver/CMakeLists.txt @@ -1,7 +1,7 @@ -# This source file is part of the Swift.org open source project +# This source file is part of the Swift open source project # # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# Licensed under Apache License v2.0 # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors diff --git a/Sources/swift-driver/main.swift b/Sources/swift-driver/main.swift index c067cb1ce..d778c4415 100644 --- a/Sources/swift-driver/main.swift +++ b/Sources/swift-driver/main.swift @@ -1,14 +1,17 @@ -//===--------------- main.swift - Swift Driver Main Entrypoint ------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// + import SwiftDriverExecution import SwiftDriver import SwiftOptions diff --git a/Sources/swift-help/CMakeLists.txt b/Sources/swift-help/CMakeLists.txt index 6f31d0932..cba8992bf 100644 --- a/Sources/swift-help/CMakeLists.txt +++ b/Sources/swift-help/CMakeLists.txt @@ -1,7 +1,7 @@ -# This source file is part of the Swift.org open source project +# This source file is part of the Swift open source project # # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# Licensed under Apache License v2.0 # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors diff --git a/Sources/swift-help/main.swift b/Sources/swift-help/main.swift index 6300b46b5..201fd30dd 100644 --- a/Sources/swift-help/main.swift +++ b/Sources/swift-help/main.swift @@ -1,12 +1,14 @@ -//===--------------- main.swift - Swift Help Main Entrypoint --------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2020-2022 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import SwiftOptions diff --git a/Tests/IncrementalImportTests/AddFuncInImportedExtensionTest.swift b/Tests/IncrementalImportTests/AddFuncInImportedExtensionTest.swift index 0ab18a0bb..732cff50a 100644 --- a/Tests/IncrementalImportTests/AddFuncInImportedExtensionTest.swift +++ b/Tests/IncrementalImportTests/AddFuncInImportedExtensionTest.swift @@ -1,12 +1,14 @@ //===-------------- ClassExtensionTest.swift - Swift Testing --------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/IncrementalImportTests/Antisymmetry.swift b/Tests/IncrementalImportTests/Antisymmetry.swift index d869c67e4..bd349313a 100644 --- a/Tests/IncrementalImportTests/Antisymmetry.swift +++ b/Tests/IncrementalImportTests/Antisymmetry.swift @@ -1,12 +1,14 @@ //===---------------- Antisymmetry.swift - Swift Testing ------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/IncrementalImportTests/HideAndShowFuncInStructAndExtensionTest.swift b/Tests/IncrementalImportTests/HideAndShowFuncInStructAndExtensionTest.swift index 68e315b15..9fa5491ed 100644 --- a/Tests/IncrementalImportTests/HideAndShowFuncInStructAndExtensionTest.swift +++ b/Tests/IncrementalImportTests/HideAndShowFuncInStructAndExtensionTest.swift @@ -1,12 +1,14 @@ //===-- HideAndShowFuncInStructAndExtensionTests.swift - Swift Testing ----===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/IncrementalImportTests/RenameMemberOfImportedStructTest.swift b/Tests/IncrementalImportTests/RenameMemberOfImportedStructTest.swift index 3c83ba615..8c5c50280 100644 --- a/Tests/IncrementalImportTests/RenameMemberOfImportedStructTest.swift +++ b/Tests/IncrementalImportTests/RenameMemberOfImportedStructTest.swift @@ -1,12 +1,14 @@ //===--------------- IncrementalImportTests.swift - Swift Testing ---------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/IncrementalImportTests/SpecificFuncAdditionInExtensionWithinModuleTest.swift b/Tests/IncrementalImportTests/SpecificFuncAdditionInExtensionWithinModuleTest.swift index 8c0a332ee..01f492128 100644 --- a/Tests/IncrementalImportTests/SpecificFuncAdditionInExtensionWithinModuleTest.swift +++ b/Tests/IncrementalImportTests/SpecificFuncAdditionInExtensionWithinModuleTest.swift @@ -1,12 +1,14 @@ //===------ ExtensionChangeWithinModuleTests.swift - Swift Testing --------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/IncrementalImportTests/Transitivity.swift b/Tests/IncrementalImportTests/Transitivity.swift index f2bb71064..721f9b926 100644 --- a/Tests/IncrementalImportTests/Transitivity.swift +++ b/Tests/IncrementalImportTests/Transitivity.swift @@ -1,12 +1,14 @@ //===---------------- Transitivity.swift - Swift Testing ------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/IncrementalTestFramework/AddOn.swift b/Tests/IncrementalTestFramework/AddOn.swift index ecef04ec5..39b12071d 100644 --- a/Tests/IncrementalTestFramework/AddOn.swift +++ b/Tests/IncrementalTestFramework/AddOn.swift @@ -1,12 +1,14 @@ //===------------------ AddOn.swift - Swift Testing -----------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/IncrementalTestFramework/CompiledSourceCollector.swift b/Tests/IncrementalTestFramework/CompiledSourceCollector.swift index cc938eec3..f3e8fc220 100644 --- a/Tests/IncrementalTestFramework/CompiledSourceCollector.swift +++ b/Tests/IncrementalTestFramework/CompiledSourceCollector.swift @@ -1,12 +1,14 @@ //===---------- CompiledSourceCollector.swift - Swift Testing -------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/IncrementalTestFramework/Context.swift b/Tests/IncrementalTestFramework/Context.swift index 8755ff946..b9788ed83 100644 --- a/Tests/IncrementalTestFramework/Context.swift +++ b/Tests/IncrementalTestFramework/Context.swift @@ -1,12 +1,14 @@ //===-------------- Context.swift - Swift Testing ----------- ---------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import TSCBasic diff --git a/Tests/IncrementalTestFramework/Expectation.swift b/Tests/IncrementalTestFramework/Expectation.swift index fd95cbd66..d6d324638 100644 --- a/Tests/IncrementalTestFramework/Expectation.swift +++ b/Tests/IncrementalTestFramework/Expectation.swift @@ -1,12 +1,14 @@ //===-- Expectation.swift - Swift Testing ----===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/IncrementalTestFramework/ExpectedCompilations.swift b/Tests/IncrementalTestFramework/ExpectedCompilations.swift index 050555b12..436a501c5 100644 --- a/Tests/IncrementalTestFramework/ExpectedCompilations.swift +++ b/Tests/IncrementalTestFramework/ExpectedCompilations.swift @@ -1,12 +1,14 @@ //===-------------- ExpectedCompilations.swift - Swift Testing -------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/IncrementalTestFramework/ExpectedProcessResult.swift b/Tests/IncrementalTestFramework/ExpectedProcessResult.swift index 49eb638e4..65402474d 100644 --- a/Tests/IncrementalTestFramework/ExpectedProcessResult.swift +++ b/Tests/IncrementalTestFramework/ExpectedProcessResult.swift @@ -1,12 +1,14 @@ //===-------------- swift -------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/IncrementalTestFramework/IncrementalTest.swift b/Tests/IncrementalTestFramework/IncrementalTest.swift index d658dcdf4..9bfe48f6c 100644 --- a/Tests/IncrementalTestFramework/IncrementalTest.swift +++ b/Tests/IncrementalTestFramework/IncrementalTest.swift @@ -1,12 +1,14 @@ //===------------- PhasedTest.swift - Swift Testing ---------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/IncrementalTestFramework/Module.swift b/Tests/IncrementalTestFramework/Module.swift index 2612fb6fb..462319dfa 100644 --- a/Tests/IncrementalTestFramework/Module.swift +++ b/Tests/IncrementalTestFramework/Module.swift @@ -1,12 +1,14 @@ //===--------------- PhasedModule.swift - Swift Testing -----------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import TSCBasic diff --git a/Tests/IncrementalTestFramework/Source.swift b/Tests/IncrementalTestFramework/Source.swift index 48d25bd25..7bd4142eb 100644 --- a/Tests/IncrementalTestFramework/Source.swift +++ b/Tests/IncrementalTestFramework/Source.swift @@ -1,12 +1,14 @@ //===----------- PhasedSources.swift - Swift Testing --------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/IncrementalTestFramework/Step.swift b/Tests/IncrementalTestFramework/Step.swift index 241a2a099..e3c11930e 100644 --- a/Tests/IncrementalTestFramework/Step.swift +++ b/Tests/IncrementalTestFramework/Step.swift @@ -1,12 +1,14 @@ //===--------------- Step.swift - Swift Testing ----------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/SwiftDriverTests/APIDigesterTests.swift b/Tests/SwiftDriverTests/APIDigesterTests.swift index ff03b7e38..d5514ff4e 100644 --- a/Tests/SwiftDriverTests/APIDigesterTests.swift +++ b/Tests/SwiftDriverTests/APIDigesterTests.swift @@ -1,12 +1,14 @@ //===----- APIDigesterTests.swift - API/ABI Digester Operation Tests ------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/AssertDiagnosticsTests.swift b/Tests/SwiftDriverTests/AssertDiagnosticsTests.swift index 6b8b4d7f2..0ca637965 100644 --- a/Tests/SwiftDriverTests/AssertDiagnosticsTests.swift +++ b/Tests/SwiftDriverTests/AssertDiagnosticsTests.swift @@ -1,12 +1,14 @@ //===--- AssertDiagnosticsTests.swift - Diagnostic Test Assertion Tests ---===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/CachingBuildTests.swift b/Tests/SwiftDriverTests/CachingBuildTests.swift index 59607357d..d6641926b 100644 --- a/Tests/SwiftDriverTests/CachingBuildTests.swift +++ b/Tests/SwiftDriverTests/CachingBuildTests.swift @@ -1,12 +1,14 @@ //===------- CachingModuleBuildTests.swift - Swift Driver Tests -----------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/CrossModuleIncrementalBuildTests.swift b/Tests/SwiftDriverTests/CrossModuleIncrementalBuildTests.swift index 750a14035..e81c08fa2 100644 --- a/Tests/SwiftDriverTests/CrossModuleIncrementalBuildTests.swift +++ b/Tests/SwiftDriverTests/CrossModuleIncrementalBuildTests.swift @@ -1,12 +1,14 @@ //===---------- CrossModuleIncrementalBuildTests.swift - Swift Testing ----===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/SwiftDriverTests/DependencyGraphSerializationTests.swift b/Tests/SwiftDriverTests/DependencyGraphSerializationTests.swift index 34a75cdce..9a0f48bac 100644 --- a/Tests/SwiftDriverTests/DependencyGraphSerializationTests.swift +++ b/Tests/SwiftDriverTests/DependencyGraphSerializationTests.swift @@ -1,12 +1,14 @@ //===----------- DependencyGraphSerializationTests.swift ------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift b/Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift index 9f7fbaa47..0ac0ed104 100644 --- a/Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift +++ b/Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift @@ -1,12 +1,14 @@ //===------- ExplicitModuleBuildTests.swift - Swift Driver Tests ----------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/Helpers/AssertDiagnostics.swift b/Tests/SwiftDriverTests/Helpers/AssertDiagnostics.swift index 2daad444f..5207e9cd5 100644 --- a/Tests/SwiftDriverTests/Helpers/AssertDiagnostics.swift +++ b/Tests/SwiftDriverTests/Helpers/AssertDiagnostics.swift @@ -1,12 +1,14 @@ //===-------- AssertDiagnostics.swift - Diagnostic Test Assertions --------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/Helpers/MockingIncrementalCompilation.swift b/Tests/SwiftDriverTests/Helpers/MockingIncrementalCompilation.swift index 87a441d65..9a2f7eaf1 100644 --- a/Tests/SwiftDriverTests/Helpers/MockingIncrementalCompilation.swift +++ b/Tests/SwiftDriverTests/Helpers/MockingIncrementalCompilation.swift @@ -1,12 +1,14 @@ //===------------- MockingIncrementalCompilation.swift --------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/Helpers/Permutations.swift b/Tests/SwiftDriverTests/Helpers/Permutations.swift index c616856e2..9a1a9fd70 100644 --- a/Tests/SwiftDriverTests/Helpers/Permutations.swift +++ b/Tests/SwiftDriverTests/Helpers/Permutations.swift @@ -1,12 +1,14 @@ //===--------------- Permutations.swift - Swift Permutations --------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/Helpers/XCTestExtensions.swift b/Tests/SwiftDriverTests/Helpers/XCTestExtensions.swift index c1bc9d52f..3e1fd7a0a 100644 --- a/Tests/SwiftDriverTests/Helpers/XCTestExtensions.swift +++ b/Tests/SwiftDriverTests/Helpers/XCTestExtensions.swift @@ -1,12 +1,14 @@ //===-------- AssertDiagnostics.swift - Diagnostic Test Assertions --------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/IncrementalCompilationTests.swift b/Tests/SwiftDriverTests/IncrementalCompilationTests.swift index b4c854e7d..8d105a4b8 100644 --- a/Tests/SwiftDriverTests/IncrementalCompilationTests.swift +++ b/Tests/SwiftDriverTests/IncrementalCompilationTests.swift @@ -1,12 +1,14 @@ //===--------------- IncrementalCompilationTests.swift - Swift Testing ----===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/SwiftDriverTests/Inputs/ExplicitModuleDependencyBuildInputs.swift b/Tests/SwiftDriverTests/Inputs/ExplicitModuleDependencyBuildInputs.swift index 1e04600e0..12ede8548 100644 --- a/Tests/SwiftDriverTests/Inputs/ExplicitModuleDependencyBuildInputs.swift +++ b/Tests/SwiftDriverTests/Inputs/ExplicitModuleDependencyBuildInputs.swift @@ -1,12 +1,14 @@ //===------ ExplicitModuleDependencyBuildInputs.swift - Test Inputs -------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/Inputs/IncrementalCompilationInputs.swift b/Tests/SwiftDriverTests/Inputs/IncrementalCompilationInputs.swift index 250ab76a3..a8bea3f97 100644 --- a/Tests/SwiftDriverTests/Inputs/IncrementalCompilationInputs.swift +++ b/Tests/SwiftDriverTests/Inputs/IncrementalCompilationInputs.swift @@ -1,12 +1,14 @@ //===--- IncrementalCompilationInputs.swift - Test Inputs -----------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/IntegrationTests.swift b/Tests/SwiftDriverTests/IntegrationTests.swift index 805e7a7df..15cc70458 100644 --- a/Tests/SwiftDriverTests/IntegrationTests.swift +++ b/Tests/SwiftDriverTests/IntegrationTests.swift @@ -1,12 +1,14 @@ //===--------------- IntegrationTests.swift - Swift Integration Tests -----===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/SwiftDriverTests/JobExecutorTests.swift b/Tests/SwiftDriverTests/JobExecutorTests.swift index 44c63e089..45c16ac4e 100644 --- a/Tests/SwiftDriverTests/JobExecutorTests.swift +++ b/Tests/SwiftDriverTests/JobExecutorTests.swift @@ -1,12 +1,14 @@ //===--------------- JobExecutorTests.swift - Swift Execution Tests -------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/SwiftDriverTests/ModuleDependencyGraphTests.swift b/Tests/SwiftDriverTests/ModuleDependencyGraphTests.swift index 785c9f92b..eb355660c 100644 --- a/Tests/SwiftDriverTests/ModuleDependencyGraphTests.swift +++ b/Tests/SwiftDriverTests/ModuleDependencyGraphTests.swift @@ -1,12 +1,14 @@ //===--------------- ModuleDependencyGraphTests.swift --------------------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/MultidictionaryTests.swift b/Tests/SwiftDriverTests/MultidictionaryTests.swift index 87e8a34b1..93fe954a4 100644 --- a/Tests/SwiftDriverTests/MultidictionaryTests.swift +++ b/Tests/SwiftDriverTests/MultidictionaryTests.swift @@ -1,12 +1,14 @@ //===------------ MultidictionaryTests.swift - Swift Testing ----===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2021 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/NonincrementalCompilationTests.swift b/Tests/SwiftDriverTests/NonincrementalCompilationTests.swift index 640b8b270..f457b30ee 100644 --- a/Tests/SwiftDriverTests/NonincrementalCompilationTests.swift +++ b/Tests/SwiftDriverTests/NonincrementalCompilationTests.swift @@ -1,12 +1,14 @@ //===------------ NonincrementalCompilationTests.swift - Swift Testing ----===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/SwiftDriverTests/ParsableMessageTests.swift b/Tests/SwiftDriverTests/ParsableMessageTests.swift index a2c4538a1..a5b2a88cd 100644 --- a/Tests/SwiftDriverTests/ParsableMessageTests.swift +++ b/Tests/SwiftDriverTests/ParsableMessageTests.swift @@ -1,12 +1,14 @@ //===--------------- ParsableMessageTests.swift - Swift Parsable Output ---===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/SwiftDriverTests/PredictableRandomNumberGeneratorTests.swift b/Tests/SwiftDriverTests/PredictableRandomNumberGeneratorTests.swift index a416b93d1..da737526a 100644 --- a/Tests/SwiftDriverTests/PredictableRandomNumberGeneratorTests.swift +++ b/Tests/SwiftDriverTests/PredictableRandomNumberGeneratorTests.swift @@ -1,12 +1,14 @@ //===--------------- PredictableRandomNumberGeneratorTests.swift ----------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/StringAdditionsTests.swift b/Tests/SwiftDriverTests/StringAdditionsTests.swift index d37231431..a2e70edc7 100644 --- a/Tests/SwiftDriverTests/StringAdditionsTests.swift +++ b/Tests/SwiftDriverTests/StringAdditionsTests.swift @@ -1,12 +1,14 @@ //===--------- StringAdditionsTests.swift - String Additions Tests --------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftDriverTests/SwiftDriverTests.swift b/Tests/SwiftDriverTests/SwiftDriverTests.swift index 12e7109cb..9abc4eaad 100644 --- a/Tests/SwiftDriverTests/SwiftDriverTests.swift +++ b/Tests/SwiftDriverTests/SwiftDriverTests.swift @@ -1,12 +1,14 @@ //===--------------- SwiftDriverTests.swift - Swift Driver Tests -======---===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// @testable @_spi(Testing) import SwiftDriver diff --git a/Tests/SwiftDriverTests/SwiftDriverToolingInterfaceTests.swift b/Tests/SwiftDriverTests/SwiftDriverToolingInterfaceTests.swift index d40e63d9f..7657e74eb 100644 --- a/Tests/SwiftDriverTests/SwiftDriverToolingInterfaceTests.swift +++ b/Tests/SwiftDriverTests/SwiftDriverToolingInterfaceTests.swift @@ -1,12 +1,14 @@ //===---- SwiftDriverToolingInterfaceTests.swift - Swift Driver Tests ----===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// @_spi(Testing) import SwiftDriver diff --git a/Tests/SwiftDriverTests/TripleTests.swift b/Tests/SwiftDriverTests/TripleTests.swift index 96cb661ad..03c51ab05 100644 --- a/Tests/SwiftDriverTests/TripleTests.swift +++ b/Tests/SwiftDriverTests/TripleTests.swift @@ -1,12 +1,14 @@ -//===--------------- TripleTests.swift - Swift Target Triple Tests --------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import XCTest diff --git a/Tests/SwiftDriverTests/TwoDMapTests.swift b/Tests/SwiftDriverTests/TwoDMapTests.swift index ee442bb66..7575d817d 100644 --- a/Tests/SwiftDriverTests/TwoDMapTests.swift +++ b/Tests/SwiftDriverTests/TwoDMapTests.swift @@ -1,12 +1,14 @@ -//===------------------------ TwoDMapTests.swift --------------------------===// +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project // -// This source file is part of the Swift.org open source project +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 // -// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/SwiftOptionsTests/OptionParsingTests.swift b/Tests/SwiftOptionsTests/OptionParsingTests.swift index 448fd7974..3efcb3649 100644 --- a/Tests/SwiftOptionsTests/OptionParsingTests.swift +++ b/Tests/SwiftOptionsTests/OptionParsingTests.swift @@ -1,12 +1,14 @@ //===------------- OptionParsingTests.swift - Parsing Tests ------======---===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import SwiftOptions diff --git a/Tests/TestUtilities/DriverExtensions.swift b/Tests/TestUtilities/DriverExtensions.swift index 1bb4a1504..7a172b34a 100644 --- a/Tests/TestUtilities/DriverExtensions.swift +++ b/Tests/TestUtilities/DriverExtensions.swift @@ -1,12 +1,14 @@ //===-------- DriverExtensions.swift - Driver Testing Extensions ----------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/TestUtilities/Fixture.swift b/Tests/TestUtilities/Fixture.swift index b3758a356..181a8a624 100644 --- a/Tests/TestUtilities/Fixture.swift +++ b/Tests/TestUtilities/Fixture.swift @@ -1,12 +1,14 @@ //===------------ Fixture.swift - Driver Testing Extensions --------------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/TestUtilities/OutputFileMapCreator.swift b/Tests/TestUtilities/OutputFileMapCreator.swift index ecb1b4df2..0f8cd8784 100644 --- a/Tests/TestUtilities/OutputFileMapCreator.swift +++ b/Tests/TestUtilities/OutputFileMapCreator.swift @@ -1,12 +1,14 @@ //===--------------- OutputFileMapCreator.swift - Swift Testing -----------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/TestUtilities/PathExtensions.swift b/Tests/TestUtilities/PathExtensions.swift index 347fd59fc..c7f8c20b0 100644 --- a/Tests/TestUtilities/PathExtensions.swift +++ b/Tests/TestUtilities/PathExtensions.swift @@ -1,12 +1,14 @@ //===---------- PathExtensions.swift - Driver Testing Extensions ----------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/TestUtilities/TemporaryFileMatching.swift b/Tests/TestUtilities/TemporaryFileMatching.swift index ff61cd559..1dfead177 100644 --- a/Tests/TestUtilities/TemporaryFileMatching.swift +++ b/Tests/TestUtilities/TemporaryFileMatching.swift @@ -1,12 +1,14 @@ //===-------- TemporaryFileMatch.swift - Driver Testing Extensions --------===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2020 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Tests/ToolingTestShim/CMakeLists.txt b/Tests/ToolingTestShim/CMakeLists.txt index a4958f5a1..1cd9dc018 100644 --- a/Tests/ToolingTestShim/CMakeLists.txt +++ b/Tests/ToolingTestShim/CMakeLists.txt @@ -1,7 +1,7 @@ -# This source file is part of the Swift.org open source project +# This source file is part of the Swift open source project # # Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# Licensed under Apache License v2.0 # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors diff --git a/Tests/ToolingTestShim/include/tooling_shim.h b/Tests/ToolingTestShim/include/tooling_shim.h index d38d0e09d..dcb97fc10 100644 --- a/Tests/ToolingTestShim/include/tooling_shim.h +++ b/Tests/ToolingTestShim/include/tooling_shim.h @@ -1,12 +1,14 @@ //=== tooling_shim.h - C API Shim for Swift Driver Tooling Testing *- C -*-===// // -// This source file is part of the Swift.org open source project +// This source file is part of the Swift open source project // // Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors -// Licensed under Apache License v2.0 with Runtime Library Exception +// Licensed under Apache License v2.0 // -// See https://swift.org/LICENSE.txt for license information -// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift project authors +// +// SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// diff --git a/Utilities/build-script-helper.py b/Utilities/build-script-helper.py index c4621de46..7d0a3286f 100755 --- a/Utilities/build-script-helper.py +++ b/Utilities/build-script-helper.py @@ -4,8 +4,8 @@ import json import os import platform -import shutil import errno +import shutil import subprocess import sys diff --git a/cmake/modules/FindLLBuild.cmake b/cmake/modules/FindLLBuild.cmake index 85c1d9a6d..d50728d69 100644 --- a/cmake/modules/FindLLBuild.cmake +++ b/cmake/modules/FindLLBuild.cmake @@ -1,10 +1,14 @@ -# This source file is part of the Swift.org open source project +#===----------------------------------------------------------------------===// # -# Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception +# This source file is part of the Swift open source project # -# See http://swift.org/LICENSE.txt for license information -# See http://swift.org/CONTRIBUTORS.txt for Swift project authors +# Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +# Licensed under Apache License v2.0 +# +# See LICENSE.txt for license information +# See CONTRIBUTORS.txt for the list of Swift project authors +# +#===----------------------------------------------------------------------===// if(TARGET llbuildSwift) return()