@@ -584,7 +584,10 @@ class llbuild(object):
584
584
link_command .extend (
585
585
["-Xlinker" , "-rpath=$ORIGIN/../lib/swift/linux" ])
586
586
if self .args .foundation_path :
587
- link_command .extend (["-L" , self .args .foundation_path ])
587
+ link_command .extend ([
588
+ "-L" , self .args .foundation_path ,
589
+ "-L" , os .path .join (self .args .foundation_path , "Foundation" )
590
+ ])
588
591
if self .args .libdispatch_build_dir :
589
592
link_command .extend (['-L' , self .args .libdispatch_build_dir ,
590
593
'-L' , os .path .join (self .args .libdispatch_build_dir , 'lib' ),
@@ -1199,7 +1202,11 @@ def main():
1199
1202
1200
1203
for module in ["Foundation" , "FoundationNetworking" , "FoundationXML" ]:
1201
1204
# Add the library.
1202
- symlink_force (os .path .join (args .foundation_path , 'lib' + module + '.so' ), libswiftdir )
1205
+ for subdir in ['Foundation' , '' ]:
1206
+ path = os .path .join (args .foundation_path , subdir , 'lib{}.so' .format (module ))
1207
+ if os .path .exists (path ):
1208
+ symlink_force (path , libswiftdir )
1209
+ break
1203
1210
1204
1211
# Add Foundation's swiftmodule.
1205
1212
for extension in [".swiftmodule" , ".swiftdoc" ]:
0 commit comments