Skip to content
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

Use _make_link_flags_darwin when target os is ios. #1843

Merged
merged 1 commit into from Mar 7, 2023
Merged

Use _make_link_flags_darwin when target os is ios. #1843

merged 1 commit into from Mar 7, 2023

Conversation

ghost
Copy link

@ghost ghost commented Feb 20, 2023

Right now, _make_link_flags_default is used when the target os is ios. However, it makes use of --whole-archive and --no-whole-archive flags, which are not supported by dyld.

As it is done for the macos target, we should use -force_load instead. _make_link_flags_darwin does that, therefore we should use it when linking for iOS.

Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Seems reasonable - thanks!

@illicitonion
Copy link
Collaborator

Not sure what's going on with CI, but it definitely seems unrelated to your change... @scentini is there a handy Googler who may know what's up with the Windows CI situation?

Right now, `_make_link_flags_default` is used when the target os is `ios`.
However, it makes use of `--whole-archive` and `--no-whole-archive` flags,
which are not supported by `dyld`.

As it is done for the `macos` target, we should use `-force_load` instead.
`_make_link_flags_darwin` does that, therefore we should use it when linking
for iOS.
@ghost
Copy link
Author

ghost commented Mar 7, 2023

Not sure what's going on with CI, but it definitely seems unrelated to your change... @scentini is there a handy Googler who may know what's up with the Windows CI situation?

I rebased, making the CI green!

@illicitonion illicitonion merged commit 17e5b04 into bazelbuild:main Mar 7, 2023
@illicitonion
Copy link
Collaborator

Thanks so much!

@ghost ghost deleted the ios_use_darwin_linker_flags branch March 7, 2023 12:25
nyurik pushed a commit to nyurik/rules_rust that referenced this pull request Mar 28, 2023
Right now, `_make_link_flags_default` is used when the target os is `ios`.
However, it makes use of `--whole-archive` and `--no-whole-archive` flags,
which are not supported by `dyld`.

As it is done for the `macos` target, we should use `-force_load` instead.
`_make_link_flags_darwin` does that, therefore we should use it when linking
for iOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant