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 @@ -757,7 +757,7 @@ def get_swiftpm_flags(args):
757
757
swift_library_rpath_prefix = "$ORIGIN/../"
758
758
platform_path = None
759
759
for path in args .target_info ["paths" ]["runtimeLibraryPaths" ]:
760
- platform_path = re .search (r"(lib/swift/[^/]+)$" , path )
760
+ platform_path = re .search (r"(lib/swift/( [^/]+) )$" , path )
761
761
if platform_path :
762
762
build_flags .extend (
763
763
[
@@ -767,6 +767,15 @@ def get_swiftpm_flags(args):
767
767
swift_library_rpath_prefix + platform_path .group (1 ),
768
768
]
769
769
)
770
+ if platform .system () == 'Linux' :
771
+ build_flags .extend (
772
+ [
773
+ "-Xlinker" ,
774
+ "-rpath" ,
775
+ "-Xlinker" ,
776
+ swift_library_rpath_prefix + '../' + platform_path .group (2 ),
777
+ ]
778
+ )
770
779
break
771
780
772
781
if not platform_path :
You can’t perform that action at this time.
0 commit comments