-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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']) | ||
link_command.extend(["-L", os.path.join(self.args.libdispatch_build_dir, "src", ".libs")]) | ||
|
||
# Add llbuild link flags. | ||
|
@@ -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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this symlink? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
||
|
@@ -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. | ||
|
There was a problem hiding this comment.
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'])
There was a problem hiding this comment.
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.