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):
755755 swift_library_rpath_prefix = "$ORIGIN/../"
756756 platform_path = None
757757 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 )
759759 if platform_path :
760760 build_flags .extend (
761761 [
@@ -765,6 +765,15 @@ def get_swiftpm_flags(args):
765765 swift_library_rpath_prefix + platform_path .group (1 ),
766766 ]
767767 )
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+ )
768777 break
769778
770779 if not platform_path :
You can’t perform that action at this time.
0 commit comments