Skip to content

Commit 647d0ea

Browse files
committed
bootstrap: allow building with shared BlocksRuntime
1 parent 971fece commit 647d0ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Utilities/bootstrap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,8 @@ class llbuild(object):
579579
if self.args.foundation_path:
580580
link_command.extend(["-L", self.args.foundation_path])
581581
if self.args.libdispatch_build_dir:
582+
link_command.extend(['-L', self.args.libdispatch_build_dir,
583+
'-Xlinker', '-lBlocksRuntime'])
582584
link_command.extend(["-L", os.path.join(self.args.libdispatch_build_dir, "src", ".libs")])
583585

584586
# Write out the link command.
@@ -993,6 +995,8 @@ def main():
993995
symlink_force(os.path.join(args.foundation_path, 'libFoundation.so'),
994996
libswiftdir)
995997
if args.libdispatch_build_dir:
998+
symlink_force(os.path.join(args.libdispatch_build_dir,
999+
"libBlocksRuntime.so"), libswiftdir)
9961000
symlink_force(os.path.join(args.libdispatch_build_dir, "src", ".libs", "libdispatch.so"),
9971001
libswiftdir)
9981002

@@ -1059,6 +1063,9 @@ def main():
10591063
build_flags.extend(["-Xswiftc", "-I{}".format(
10601064
args.libdispatch_source_dir)])
10611065
build_flags.extend(["-Xcc", "-fblocks"])
1066+
build_flags.extend(['-Xlinker', '-L', '-Xlinker',
1067+
args.libdispatch_build_dir,
1068+
'-Xlinker', '-lBlocksRuntime')
10621069

10631070
# Enable testing in release mode because SwiftPM's tests uses @testable imports.
10641071
#

0 commit comments

Comments
 (0)