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: fail if requested -framework is not found #10312

Merged
merged 1 commit into from
Dec 12, 2021

Conversation

motiejus
Copy link
Contributor

If -framework is requested, but not found, the linker will err
instead of creating a strange executable.

#10299 (comment)

Refs #9542
Refs #10299
Refs #10158

If `-framework` is requested, but not found, the linker will err
instead of creating a strange executable.

ziglang#10299 (comment)

Refs ziglang#9542
Refs ziglang#10299
Refs ziglang#10158
@kubkon
Copy link
Member

kubkon commented Dec 11, 2021

Thanks @motiejus! Do you mind if I add a few tweaks to your proposed solution? Namely, I don't want the linker fail prematurely until it resolves all of the symbols first, and then the priority should be to fail with UndefinedSymbolReference before failing with FrameworkNotFound. This should give the user a better idea what symbols were unresolved if any. In case we are able to resolve every symbol but fail to find a framework that might be used at runtime, we then fail with FrameworkNotFound.

@motiejus
Copy link
Contributor Author

Thanks @motiejus! Do you mind if I add a few tweaks to your proposed solution? Namely, I don't want the linker fail prematurely until it resolves all of the symbols first, and then the priority should be to fail with UndefinedSymbolReference before failing with FrameworkNotFound. This should give the user a better idea what symbols were unresolved if any. In case we are able to resolve every symbol but fail to find a framework that might be used at runtime, we then fail with FrameworkNotFound.

Sure, that sounds like a great improvement!

@kubkon kubkon merged commit 1abae06 into ziglang:master Dec 12, 2021
@motiejus motiejus deleted the framework-not-found branch December 15, 2021 12:57
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.

2 participants