File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -755,7 +755,7 @@ def get_swiftpm_flags(args):
755
755
swift_library_rpath_prefix = "$ORIGIN/../"
756
756
platform_path = None
757
757
for path in args .target_info ["paths" ]["runtimeLibraryPaths" ]:
758
- platform_path = re .search (r"(lib/swift/[^/]+)$" , path )
758
+ platform_path = re .search (r"(lib/swift/( [^/]+) )$" , path )
759
759
if platform_path :
760
760
build_flags .extend (
761
761
[
@@ -765,6 +765,15 @@ def get_swiftpm_flags(args):
765
765
swift_library_rpath_prefix + platform_path .group (1 ),
766
766
]
767
767
)
768
+ if platform .system () == 'Linux' :
769
+ build_flags .extend (
770
+ [
771
+ "-Xlinker" ,
772
+ "-rpath" ,
773
+ "-Xlinker" ,
774
+ swift_library_rpath_prefix + '../' + platform_path .group (2 ),
775
+ ]
776
+ )
768
777
break
769
778
770
779
if not platform_path :
You can’t perform that action at this time.
0 commit comments