Skip to content

Commit 6909152

Browse files
committed
Fix PATH
1 parent 204f061 commit 6909152

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

Sources/SwiftDriver/Jobs/Planning.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ extension Driver {
9191
jobsBeforeCompiles.append(job)
9292
}
9393

94-
var compileJobGroups = [CompileJobGroup]()
94+
var compileJobGroups = [CompileJobGroup]()
9595
func addCompileJobGroup(_ group: CompileJobGroup) {
9696
compileJobGroups.append(group)
9797
}

Sources/SwiftDriver/Toolchains/GenericUnixToolchain.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ import TSCBasic
2121
/// The file system to use for queries.
2222
public let fileSystem: FileSystem
2323

24-
/// Doubles as path cache and point for overriding normal lookup
25-
private var toolPaths = [Tool: AbsolutePath]()
26-
2724
// An externally provided path from where we should find compiler
2825
public let compilerExecutableDir: AbsolutePath?
2926

27+
/// Doubles as path cache and point for overriding normal lookup
28+
private var toolPaths = [Tool: AbsolutePath]()
29+
30+
// An externally provided path from where we should find tools like ld
3031
public let toolDirectory: AbsolutePath?
3132

3233
public let dummyForTestingObjectFormat = Triple.ObjectFormat.elf

Sources/SwiftDriver/Toolchains/Toolchain.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public enum Tool: Hashable {
102102

103103
extension Toolchain {
104104
public var searchPaths: [AbsolutePath] {
105-
getEnvSearchPaths(pathString: env["PATH"], currentWorkingDirectory: fileSystem.currentWorkingDirectory)
105+
getEnvSearchPaths(pathString: ProcessEnv.path, currentWorkingDirectory: fileSystem.currentWorkingDirectory)
106106
}
107107

108108
/// Returns the `executablePath`'s directory.

Sources/SwiftDriver/Toolchains/WebAssemblyToolchain.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ import SwiftOptions
4242
/// The file system to use for queries.
4343
public let fileSystem: FileSystem
4444

45+
// An externally provided path from where we should find compiler
46+
public let compilerExecutableDir: AbsolutePath?
47+
4548
/// Doubles as path cache and point for overriding normal lookup
4649
private var toolPaths = [Tool: AbsolutePath]()
4750

48-
public let compilerExecutableDir: AbsolutePath?
49-
51+
// An externally provided path from where we should find tools like ld
5052
public let toolDirectory: AbsolutePath?
5153

5254
public let dummyForTestingObjectFormat = Triple.ObjectFormat.wasm

Sources/SwiftDriver/Toolchains/WindowsToolchain.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ import SwiftOptions
2222
/// The file system to use for queries.
2323
public let fileSystem: FileSystem
2424

25-
/// Doubles as path cache and point for overriding normal lookup
26-
private var toolPaths = [Tool: AbsolutePath]()
27-
2825
// An externally provided path from where we should find compiler
2926
public let compilerExecutableDir: AbsolutePath?
3027

28+
/// Doubles as path cache and point for overriding normal lookup
29+
private var toolPaths = [Tool: AbsolutePath]()
30+
3131
// An externally provided path from where we should find tools like ld
3232
public let toolDirectory: AbsolutePath?
3333

0 commit comments

Comments
 (0)