Skip to content

Commit c115e14

Browse files
neonichuDougGregor
andauthored
Pass toolchainLibDir if using XCBuild (#3695)
* Pass `toolchainLibDir` if using XCBuild We pass this as an additional `-L` when building with SwiftPM's own build system, so we should also pass this when using XCBuild. rdar://82313817 * Account for the platform-specific path where link libraries are found Co-authored-by: Doug Gregor <[email protected]>
1 parent 8beea8a commit c115e14

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/XCBuildSupport/XcodeBuildSystem.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public final class XcodeBuildSystem: SPMBuildCore.BuildSystem {
149149
var settings: [String: String] = [:]
150150
// Always specify the path of the effective Swift compiler, which was determined in the same way as for the native build system.
151151
settings["SWIFT_EXEC"] = buildParameters.toolchain.swiftCompiler.pathString
152+
settings["LIBRARY_SEARCH_PATHS"] = "$(inherited) \(buildParameters.toolchain.toolchainLibDir.pathString)/swift/macosx"
152153
// Optionally also set the list of architectures to build for.
153154
if !buildParameters.archs.isEmpty {
154155
settings["ARCHS"] = buildParameters.archs.joined(separator: " ")

0 commit comments

Comments
 (0)