File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ add_library(SwiftDriver
23
23
Driver/ModuleOutputInfo.swift
24
24
Driver/OutputFileMap.swift
25
25
Driver/ToolExecutionDelegate.swift
26
+ Driver/DriverVersion.swift
26
27
27
28
Execution/ArgsResolver.swift
28
29
Execution/DriverExecutor.swift
Original file line number Diff line number Diff line change @@ -830,6 +830,12 @@ extension Driver {
830
830
buildRecordInfo == nil ) {
831
831
assert ( jobs. count == 1 , " Cannot execute in place for multi-job build plans " )
832
832
var job = jobs [ 0 ]
833
+ // Print the driver source version first before we print the compiler
834
+ // versions.
835
+ if job. kind == . versionRequest && !Driver. driverSourceVersion. isEmpty {
836
+ stderrStream <<< " swift-driver version: " <<< Driver . driverSourceVersion <<< " \n "
837
+ stderrStream. flush ( )
838
+ }
833
839
// Require in-place execution for all single job plans.
834
840
job. requiresInPlaceExecution = true
835
841
try executor. execute ( job: job,
Original file line number Diff line number Diff line change
1
+ //===------ DriverVersion.swift - Swift Driver Source Version--------------===//
2
+ //
3
+ // This source file is part of the Swift.org open source project
4
+ //
5
+ // Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
6
+ // Licensed under Apache License v2.0 with Runtime Library Exception
7
+ //
8
+ // See https://swift.org/LICENSE.txt for license information
9
+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10
+ //
11
+ //===----------------------------------------------------------------------===//
12
+ extension Driver {
13
+ #if SWIFT_DRIVER_VERSION_DEFINED
14
+ static let driverSourceVersion : String = SWIFT_DRIVER_VERSION
15
+ #else
16
+ static let driverSourceVersion : String = " "
17
+ #endif
18
+ }
You can’t perform that action at this time.
0 commit comments