-
Notifications
You must be signed in to change notification settings - Fork 166
Use a parameter file when linking Swift libraries when the host machine is macOS #473
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 |
|---|---|---|
|
|
@@ -168,6 +168,12 @@ def _swift_toolchain_impl(ctx): | |
| toolchain_root, | ||
| ) | ||
|
|
||
| # The static archiver on Linux doesn't currently support the `-filelist` | ||
| # flag. This should be handled by the C++ toolchain once we migrate away | ||
| # from invoking the linker directly for static linking. | ||
| # See https://github.com/bazelbuild/rules_swift/pull/349#issuecomment-550353580. | ||
| linker_supports_filelist = True if ctx.attr.os == "darwin" else False | ||
|
Member
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. does this toolchain ever get used on darwin? I think you can only get the xcode one there?
Member
Author
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. Ahh yeah
Member
Author
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.
Member
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. This could be: linker_supports_filelist = ctx.attr.os == "darwin"
Member
Author
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. I feel so dumb 🤦🏼♂️
Member
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. haha, nbd, one of those things you don't notice without fresh eyes |
||
|
|
||
| # Combine build mode features, autoconfigured features, and required | ||
| # features. | ||
| requested_features = features_for_build_modes(ctx) | ||
|
|
@@ -204,6 +210,7 @@ def _swift_toolchain_impl(ctx): | |
| command_line_copts = ctx.fragments.swift.copts(), | ||
| cpu = ctx.attr.arch, | ||
| linker_opts_producer = linker_opts_producer, | ||
| linker_supports_filelist = linker_supports_filelist, | ||
| object_format = "elf", | ||
| optional_implicit_deps = [], | ||
| requested_features = requested_features, | ||
|
|
||
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.
can't args files be nested? so you could
args.add(filelist_args)?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.
ah I see this was asked below as well