Skip to content

macho: fail if requested -framework is not found#10312

Merged
kubkon merged 1 commit intoziglang:masterfrom
motiejus:framework-not-found
Dec 12, 2021
Merged

macho: fail if requested -framework is not found#10312
kubkon merged 1 commit intoziglang:masterfrom
motiejus:framework-not-found

Conversation

@motiejus
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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