Skip to content

Commit 00c486c

Browse files
authored
Merge pull request #1573 from rintaro/plugin-path-rdar121451763
Stop adding '-external-plugin-path' to SDK directories
2 parents f7c5749 + a5cc373 commit 00c486c

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

Sources/SwiftDriver/Toolchains/DarwinToolchain.swift

-9
Original file line numberDiff line numberDiff line change
@@ -434,15 +434,6 @@ public final class DarwinToolchain: Toolchain {
434434
}
435435

436436
if driver.isFrontendArgSupported(.externalPluginPath) {
437-
// Default paths for compiler plugins found within an SDK (accessed via
438-
// that SDK's plugin server).
439-
let sdkPathRoot = VirtualPath.lookup(sdkPath).appending(components: "usr")
440-
commandLine.appendFlag(.externalPluginPath)
441-
commandLine.appendFlag("\(sdkPathRoot.pluginPath.name)#\(sdkPathRoot.pluginServerPath.name)")
442-
443-
commandLine.appendFlag(.externalPluginPath)
444-
commandLine.appendFlag("\(sdkPathRoot.localPluginPath.name)#\(sdkPathRoot.pluginServerPath.name)")
445-
446437
// Determine the platform path. For simulator platforms, look into the
447438
// corresponding device platform instance.
448439
let origPlatformPath = VirtualPath.lookup(sdkPath)

Tests/SwiftDriverTests/SwiftDriverTests.swift

-14
Original file line numberDiff line numberDiff line change
@@ -7322,19 +7322,6 @@ final class SwiftDriverTests: XCTestCase {
73227322
XCTAssertLessThan(pluginB2Index!, pluginCIndex!)
73237323

73247324
#if os(macOS)
7325-
XCTAssertTrue(job.commandLine.contains(.flag("-external-plugin-path")))
7326-
let sdkServerPath = sdkRoot.appending(components: "usr", "bin", "swift-plugin-server").pathString
7327-
let sdkPluginPath = sdkRoot.appending(components: "usr", "lib", "swift", "host", "plugins").pathString
7328-
7329-
let sdkPluginPathIndex = job.commandLine.firstIndex(of: .flag("\(sdkPluginPath)#\(sdkServerPath)"))
7330-
XCTAssertNotNil(sdkPluginPathIndex)
7331-
XCTAssertLessThan(pluginCIndex!, sdkPluginPathIndex!)
7332-
7333-
let sdkLocalPluginPath = sdkRoot.appending(components: "usr", "local", "lib", "swift", "host", "plugins").pathString
7334-
let sdkLocalPluginPathIndex = job.commandLine.firstIndex(of: .flag("\(sdkLocalPluginPath)#\(sdkServerPath)"))
7335-
XCTAssertNotNil(sdkLocalPluginPathIndex)
7336-
XCTAssertLessThan(sdkPluginPathIndex!, sdkLocalPluginPathIndex!)
7337-
73387325
let origPlatformPath =
73397326
sdkRoot.parentDirectory.parentDirectory.parentDirectory.parentDirectory
73407327
.appending(component: "\(searchPlatform).platform")
@@ -7345,7 +7332,6 @@ final class SwiftDriverTests: XCTestCase {
73457332
let platformPluginPath = platformPath.appending(components: "lib", "swift", "host", "plugins")
73467333
let platformPluginPathIndex = job.commandLine.firstIndex(of: .flag("\(platformPluginPath)#\(platformServerPath)"))
73477334
XCTAssertNotNil(platformPluginPathIndex)
7348-
XCTAssertLessThan(sdkLocalPluginPathIndex!, platformPluginPathIndex!)
73497335

73507336
let platformLocalPluginPath = platformPath.appending(components: "local", "lib", "swift", "host", "plugins")
73517337
let platformLocalPluginPathIndex = job.commandLine.firstIndex(of: .flag("\(platformLocalPluginPath)#\(platformServerPath)"))

0 commit comments

Comments
 (0)