Skip to content

Commit b78c74e

Browse files
authored
Merge pull request swiftlang#1069 from nkcsgexi/less-lazy-var
PrebuiltModules: avoid exposing private iosMac framework paths. NFC
2 parents 08e10f2 + 60fdc50 commit b78c74e

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

Sources/SwiftDriver/Driver/Driver.swift

+2-9
Original file line numberDiff line numberDiff line change
@@ -355,20 +355,13 @@ public struct Driver {
355355
return VirtualPath.lookup(rawSdkPath)
356356
} ()
357357

358-
lazy var iosMacFrameworksBase: VirtualPath = {
358+
lazy var iosMacFrameworksSearchPath: VirtualPath = {
359359
sdkPath!
360360
.appending(component: "System")
361361
.appending(component: "iOSSupport")
362362
.appending(component: "System")
363363
.appending(component: "Library")
364-
} ()
365-
366-
lazy var iosMacFrameworksSearchPath: VirtualPath = {
367-
iosMacFrameworksBase.appending(component: "Frameworks")
368-
} ()
369-
370-
lazy var iosMacPrivateFrameworksSearchPath: VirtualPath = {
371-
iosMacFrameworksBase.appending(component: "PrivateFrameworks")
364+
.appending(component: "Frameworks")
372365
} ()
373366

374367
lazy var abiDescriptorPath: TypedVirtualPath? = {

Sources/SwiftDriver/Jobs/PrebuiltModulesJob.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,8 @@ extension Driver {
598598
commandLine.append(.path(iosMacFrameworksSearchPath))
599599
if isInternal {
600600
commandLine.appendFlag(.Fsystem)
601-
commandLine.append(.path(iosMacPrivateFrameworksSearchPath))
601+
commandLine.append(.path(iosMacFrameworksSearchPath.parentDirectory
602+
.appending(component: "PrivateFrameworks")))
602603
}
603604
}
604605
if isInternal {

0 commit comments

Comments
 (0)