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

macho: handle -dead_strip_dylibs, -needed-lx and -needed_framework x flags #11941

Merged
merged 2 commits into from
Jun 28, 2022

Conversation

kubkon
Copy link
Member

@kubkon kubkon commented Jun 27, 2022

Closes #10192

MachO linker now handles `-needed-l<name>`, `-needed_library=<name>`
and `-needed_framework=<name>`. While on macOS `-l` is equivalent
to `-needed-l`, and `-framework` to `-needed_framework`, it can be
used to the same effect as on Linux if combined with `-dead_strip_dylibs`.

This commit also adds handling for `-needed_library` which is macOS
specific flag only (in addition to `-needed-l`).

Finally, in order to leverage new linker testing harness, this commit
added ability to specify lowering to those flags via `build.zig`:
`linkSystemLibraryNeeded` (and related), and `linkFrameworkNeeded`.
@kubkon kubkon merged commit d4623a8 into master Jun 28, 2022
@kubkon kubkon deleted the macho-stripping-dylibs branch June 28, 2022 05:22
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.

honor the needed flag of SystemLibs in the macos linker code
1 participant