@@ -579,6 +579,8 @@ class llbuild(object):
579
579
if self .args .foundation_path :
580
580
link_command .extend (["-L" , self .args .foundation_path ])
581
581
if self .args .libdispatch_build_dir :
582
+ link_command .extend (['-L' , self .args .libdispatch_build_dir ,
583
+ '-Xlinker' , '-lBlocksRuntime' ])
582
584
link_command .extend (["-L" , os .path .join (self .args .libdispatch_build_dir , "src" , ".libs" )])
583
585
584
586
# Write out the link command.
@@ -993,6 +995,8 @@ def main():
993
995
symlink_force (os .path .join (args .foundation_path , 'libFoundation.so' ),
994
996
libswiftdir )
995
997
if args .libdispatch_build_dir :
998
+ symlink_force (os .path .join (args .libdispatch_build_dir ,
999
+ "libBlocksRuntime.so" ), libswiftdir )
996
1000
symlink_force (os .path .join (args .libdispatch_build_dir , "src" , ".libs" , "libdispatch.so" ),
997
1001
libswiftdir )
998
1002
@@ -1059,6 +1063,9 @@ def main():
1059
1063
build_flags .extend (["-Xswiftc" , "-I{}" .format (
1060
1064
args .libdispatch_source_dir )])
1061
1065
build_flags .extend (["-Xcc" , "-fblocks" ])
1066
+ build_flags .extend (['-Xlinker' , '-L' , '-Xlinker' ,
1067
+ args .libdispatch_build_dir ,
1068
+ '-Xlinker' , '-lBlocksRuntime' )
1062
1069
1063
1070
# Enable testing in release mode because SwiftPM's tests uses @testable imports.
1064
1071
#
0 commit comments