Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use the unversioned subdirectory in the rpath.
While we use versioned subdirectory triples for Swift module paths, this
part of the rpath should be unversioned, if at the very least, for
consistency.

While we are here, ensure that -z origin is used when linking, which is
necessary for ORIGIN processing.
  • Loading branch information
3405691582 committed Sep 13, 2025
commit 4eb3f2d3fa5b3dc9574d6163602a55f1629c0dcb
5 changes: 5 additions & 0 deletions Utilities/build-script-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ def get_swiftpm_options(args):
swiftpm_args += [
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/freebsd',
]
elif '-openbsd' in args.build_target:
swiftpm_args += [
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/openbsd',
'-Xlinker', '-z', '-Xlinker', 'origin',
]
else:
# Library rpath for swift, dispatch, Foundation, etc. when installing
swiftpm_args += [
Expand Down