Skip to content

Commit 1ca731b

Browse files
committed
Don’t hardcode path to xctoolchain
$(TOOLCHAIN_DIR) exists, fortunately.
1 parent b354d67 commit 1ca731b

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

Sources/Xcodeproj/Module+PBXProj.swift

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
layer for these properties we satisfy the above constraints.
2424
*/
2525

26-
import struct Utility.Toolchain
2726
import struct Utility.Path
2827
import PackageType
2928

@@ -169,15 +168,7 @@ extension SwiftModule {
169168
buildSettings["LD_RUNPATH_SEARCH_PATHS"] = "'@loader_path/../Frameworks'"
170169

171170
} else {
172-
173-
//FIXME we should not have to set this ourselves, and in fact
174-
// it is problematic because now you must regenerate the xcodeproj
175-
// whenever the toolchain changes :(
176-
// static linking would be better since that is what we are meant
177-
// to do while swift has no ABI compatability.
178-
// probably the real solution is to generate frameworks since then
179-
// Xcode will embed the swift runtime libs
180-
buildSettings["LD_RUNPATH_SEARCH_PATHS"] = "'\(Toolchain.prefix)/usr/lib/swift/macosx'"
171+
buildSettings["LD_RUNPATH_SEARCH_PATHS"] = "'$(TOOLCHAIN_DIR)/usr/lib/swift/macosx'"
181172

182173
if isLibrary {
183174
buildSettings["ENABLE_TESTABILITY"] = "YES"

0 commit comments

Comments
 (0)