Skip to content

Commit b7ddbd9

Browse files
authored
Merge pull request #2347 from gmittert/WhereDidIPutIt
Enable SWIFTPM_CUSTOM_BINDIR in Non Debug
2 parents ed61206 + 681ce74 commit b7ddbd9

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Sources/Workspace/Destination.swift

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ public struct Destination: Encodable {
6464
//
6565
// This also means that we should have bootstrapped with the same Swift toolchain
6666
// 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.
7067
return AbsolutePath(#file).parentDirectory
7168
.parentDirectory.parentDirectory.appending(components: ".build", hostTargetTriple.tripleString, "debug")
7269
#else
@@ -84,10 +81,9 @@ public struct Destination: Encodable {
8481
environment: [String:String] = ProcessEnv.vars
8582
) throws -> Destination {
8683
// 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
84+
let customBinDir = ProcessEnv
85+
.vars["SWIFTPM_CUSTOM_BINDIR"]
86+
.flatMap{ try? AbsolutePath(validating: $0) }
9187
let binDir = customBinDir ?? binDir ?? Destination.hostBinDir(
9288
originalWorkingDirectory: originalWorkingDirectory)
9389

0 commit comments

Comments
 (0)