Skip to content

Commit 2c1cb9d

Browse files
authored
Merge pull request #1054 from compnerd/undeveloped
SwiftDriver: unlearn about `DEVELOPER_DIR`
2 parents ae1cecc + b1e6844 commit 2c1cb9d

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

Sources/SwiftDriver/Toolchains/Toolchain.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,6 @@ extension Toolchain {
230230
return try lookup(executable: executableName("swift"))
231231
} else if fallbackToExecutableDefaultPath {
232232
if self is WindowsToolchain {
233-
if let DEVELOPER_DIR = env["DEVELOPER_DIR"] {
234-
return AbsolutePath(DEVELOPER_DIR)
235-
.appending(component: "Toolchains")
236-
.appending(component: "unknown-Asserts-development.xctoolchain")
237-
.appending(component: "usr")
238-
.appending(component: "bin")
239-
.appending(component: executableName(executable))
240-
}
241233
return try getToolPath(.swiftCompiler)
242234
.parentDirectory
243235
.appending(component: executable)

Sources/SwiftDriver/Toolchains/WindowsToolchain.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,9 @@ extension WindowsToolchain.ToolchainValidationError {
109109
}
110110

111111
public func defaultSDKPath(_ target: Triple?) throws -> AbsolutePath? {
112-
// The SDKROOT environment always takes precedent. If SDKROOT is undefined,
113-
// but we have DEVELOPER_DIR defined and a valid triple, compose the SDK
114-
// root relative to the DEVELOPER_DIR. The SDKs are always laid out as
115-
// `[DeveloperDir]\Platforms\[OS].platform\Developer\SDKs\[OS].sdk`,
116-
// allowing us to locate it relative to the DEVELOPER_DIR environment
117-
// variable.
118-
119112
// TODO(compnerd): replicate the SPM processing of the SDKInfo.plist
120113
if let SDKROOT = env["SDKROOT"] {
121114
return AbsolutePath(SDKROOT)
122-
} else if let DEVELOPER_DIR = env["DEVELOPER_DIR"], let os = target?.os?.rawValue {
123-
// FIXME(compnerd) we should capitalise the OS name, e.g. windows ->
124-
// Windows; we get away with this for now as Windows has a
125-
// case-insensitive file system.
126-
return AbsolutePath("\(DEVELOPER_DIR)\\Platforms\\\(os).platform\\Developer\\SDKs\\\(os).sdk")
127115
}
128116
return nil
129117
}

Tests/TestUtilities/DriverExtensions.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ private let cachedSDKPath: Result<String, Error>? = {
4848
#if os(Windows)
4949
if let sdk = ProcessEnv.vars["SDKROOT"] {
5050
return Result{sdk}
51-
} else if let root = ProcessEnv.vars["DEVELOPER_DIR"] {
52-
return Result{"\(root)\\Platforms\\Windows.platform\\Developer\\SDKs\\Windows.sdk"}
5351
}
5452
// Assume that if neither of the environment variables are set, we are
5553
// using a build-tree version of the swift frontend, and so we do not set

0 commit comments

Comments
 (0)