Skip to content

Commit a666df9

Browse files
committed
Minor fixes
1 parent 9d308f1 commit a666df9

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@
55
xcuserdata/
66
.swiftpm
77
.idea/
8-
.idea/

Sources/SwiftDriver/Toolchains/Toolchain.swift

+1-6
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,7 @@ extension Toolchain {
145145
/// looks in the `executableDir`, `xcrunFind` or in the `searchPaths`.
146146
/// - Parameter executable: executable to look for [i.e. `swift`].
147147
func lookup(executable: String) throws -> AbsolutePath {
148-
let filename: String
149-
#if os(Windows)
150-
filename = "\(executable).exe"
151-
#else
152-
filename = executable
153-
#endif
148+
let filename = executable + executableFileSuffix
154149
if let overrideString = envVar(forExecutable: executable) {
155150
return try AbsolutePath(validating: overrideString)
156151
} else if let toolDir = toolDirectory,

Sources/swift-driver/main.swift

+1-5
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ do {
4545
if case .subcommand(let subcommand) = mode {
4646
// We are running as a subcommand, try to find the subcommand adjacent to the executable we are running as.
4747
// If we didn't find the tool there, let the OS search for it.
48-
#if os(Windows)
49-
let filename = subcommand + ".exe"
50-
#else
51-
let filename = subcommand
52-
#endif
48+
let filename = subcommand + executableFileSuffix
5349
let subcommandPath = Process.findExecutable(arguments[0])?.parentDirectory.appending(component: filename)
5450
?? Process.findExecutable(filename)
5551

Tests/SwiftDriverTests/ModuleDependencyGraphTests.swift

-2
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,6 @@ extension ModuleDependencyGraph {
970970
let directlyIinvalidatedNodes = getInvalidatedNodesForSimulatedLoad(
971971
swiftDepsIndex,
972972
dependencyDescriptions,
973-
includeAddedExternals: true,
974973
interfaceHash,
975974
includePrivateDeps: includePrivateDeps,
976975
hadCompilationError: hadCompilationError)
@@ -983,7 +982,6 @@ extension ModuleDependencyGraph {
983982
func getInvalidatedNodesForSimulatedLoad(
984983
_ swiftDepsIndex: Int,
985984
_ dependencyDescriptions: [MockDependencyKind: [String]],
986-
includeAddedExternals: Bool,
987985
_ interfaceHashIfPresent: String? = nil,
988986
includePrivateDeps: Bool = true,
989987
hadCompilationError: Bool = false

0 commit comments

Comments
 (0)