Skip to content

Commit fe5d0ce

Browse files
committed
FreeBSD: Fix rpath to swift runtimes
The build_os in build-script includes the platform version number from the target triple. The runtimes are installed to a location that does not include the version number, resulting in the swift-driver failing to launch due to not finding libswiftCore. Fixing the rpath to avoid requiring folks to manually specify the correct location through environment variables.
1 parent fec47e6 commit fe5d0ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Utilities/build-script-helper.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ def get_swiftpm_options(args):
105105
swiftpm_args += [
106106
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android',
107107
]
108+
elif '-freebsd' in args.build_target:
109+
# Library rpath for swift, dispatch, Foundation, etc. when installing
110+
swiftpm_args += [
111+
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/freebsd',
112+
]
108113
else:
109114
# Library rpath for swift, dispatch, Foundation, etc. when installing
110115
swiftpm_args += [

0 commit comments

Comments
 (0)