Skip to content

Commit

Permalink
SR-7154: Make swiftpm tests work when building with --debug-foundation
Browse files Browse the repository at this point in the history
- 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.

(cherry picked from commit 2ba2086)
  • Loading branch information
spevans authored and gottesmm committed Apr 25, 2018
1 parent cd9ec0d commit a02eec7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def generate_products(self):
if Configuration.current.bootstrap_directory is not None:
ld_flags += """ -L${TARGET_BOOTSTRAP_DIR}/usr/lib"""

if Configuration.current.build_mode == Configuration.Debug:
ld_flags += """ -rpath ${SDKROOT}/lib/swift/""" + Configuration.current.target.swift_sdk_name + """ """

if Configuration.current.linker is not None:
ld_flags += " -fuse-ld=" + Configuration.current.linker

Expand Down

0 comments on commit a02eec7

Please sign in to comment.