File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
import TSCBasic
2
2
import Build
3
3
import TSCUtility
4
+ import Foundation
4
5
5
6
public enum DestinationError : Swift . Error {
6
7
/// Couldn't find the Xcode installation.
@@ -64,9 +65,6 @@ public struct Destination: Encodable {
64
65
//
65
66
// This also means that we should have bootstrapped with the same Swift toolchain
66
67
// we're using inside Xcode otherwise we will not be able to load the runtime libraries.
67
- //
68
- // FIXME: We may want to allow overriding this using an env variable but that
69
- // doesn't seem urgent or extremely useful as of now.
70
68
return AbsolutePath ( #file) . parentDirectory
71
69
. parentDirectory. parentDirectory. appending ( components: " .build " , hostTargetTriple. tripleString, " debug " )
72
70
#else
@@ -84,10 +82,9 @@ public struct Destination: Encodable {
84
82
environment: [ String : String ] = ProcessEnv . vars
85
83
) throws -> Destination {
86
84
// Select the correct binDir.
87
- var customBinDir : AbsolutePath ?
88
- #if DEBUG
89
- customBinDir = ProcessEnv . vars [ " SWIFTPM_CUSTOM_BINDIR " ] . flatMap { try ? AbsolutePath ( validating: $0) }
90
- #endif
85
+ let customBinDir = ProcessEnv
86
+ . vars [ " SWIFTPM_CUSTOM_BINDIR " ]
87
+ . flatMap { try ? AbsolutePath ( validating: $0) }
91
88
let binDir = customBinDir ?? binDir ?? Destination . hostBinDir (
92
89
originalWorkingDirectory: originalWorkingDirectory)
93
90
You can’t perform that action at this time.
0 commit comments