Skip to content

Commit 2ba2086

Browse files
committed
SR-7154: Make swiftpm tests work when building with --debug-foundation
- If building in debug mode, add an RPATH to the build lib dir of swift so that libFoundation.so can find libswiftSwiftOnone.so, required when using -Onone.
1 parent d1272be commit 2ba2086

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/script.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ def generate_products(self):
142142
if Configuration.current.bootstrap_directory is not None:
143143
ld_flags += """ -L${TARGET_BOOTSTRAP_DIR}/usr/lib"""
144144

145+
if Configuration.current.build_mode == Configuration.Debug:
146+
ld_flags += """ -rpath ${SDKROOT}/lib/swift/""" + Configuration.current.target.swift_sdk_name + """ """
147+
145148
if Configuration.current.linker is not None:
146149
ld_flags += " -fuse-ld=" + Configuration.current.linker
147150

0 commit comments

Comments
 (0)