Skip to content

bootstrap: allow building with shared BlocksRuntime #1631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Utilities/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,8 @@ class llbuild(object):
if self.args.foundation_path:
link_command.extend(["-L", self.args.foundation_path])
if self.args.libdispatch_build_dir:
link_command.extend(['-L', self.args.libdispatch_build_dir,
'-Xlinker', '-lBlocksRuntime'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be
link_command.extend(['-L', self.args.libdispatch_build_dir, '-lBlocksRuntime'])

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seemed that the actual linked library names are passed directly through the driver in the rest of the build. Im just following the pattern. I believe that the driver will forward the options either way.

link_command.extend(["-L", os.path.join(self.args.libdispatch_build_dir, "src", ".libs")])

# Add llbuild link flags.
Expand Down Expand Up @@ -1125,6 +1127,9 @@ def main():
symlink_force(os.path.join(args.foundation_path, 'libFoundation.so'),
libswiftdir)
if args.libdispatch_build_dir:
symlink_force(os.path.join(args.libdispatch_build_dir,
'libBlocksRuntime.so'),
libswiftdir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this symlink?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without that symlink, the tests tended to fail. libdispatch would not be found, but by keeping the symlink there, which is one of the paths that linker/loader consult, the tests are happier.

symlink_force(os.path.join(args.libdispatch_build_dir, "src", ".libs", "libdispatch.so"),
libswiftdir)

Expand Down Expand Up @@ -1191,6 +1196,8 @@ def main():
build_flags.extend(["-Xswiftc", "-I{}".format(
args.libdispatch_source_dir)])
build_flags.extend(["-Xcc", "-fblocks"])
build_flags.extend(['-Xlinker', '-L', '-Xlinker', args.libdispatch_build_dir,
'-Xlinker', '-lBlocksRuntime'])

if args.link_llbuild:
# Add llbuild import flags.
Expand Down