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

Abort compilation on macos if linker arguments are missing #439

Merged
merged 2 commits into from
Mar 18, 2022

Conversation

evnu
Copy link
Member

@evnu evnu commented Mar 16, 2022

This PR adds a mechanism to search through .cargo/config files up from the crate to the workspace root in order to find target configuration for macos. If any such configuration is found, we assume that it contains the linker arguments required to make rustler work on macos.

Fix #235.

@evnu evnu mentioned this pull request Mar 16, 2022
@evnu evnu requested a review from a team March 16, 2022 07:53
@evnu evnu marked this pull request as ready for review March 16, 2022 07:53
@filmor
Copy link
Member

filmor commented Mar 16, 2022

If we do that, we might as well just force the correct arguments...

@evnu
Copy link
Member Author

evnu commented Mar 16, 2022

If we do that, we might as well just force the correct arguments...

You mean as in adding them to the args? The problem with that approach is that we then need to call cargo build for each target separately, see #401 (comment).

Copy link
Member

@philss philss left a comment

Choose a reason for hiding this comment

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

Some suggestions :)

rustler_mix/lib/rustler/compiler.ex Outdated Show resolved Hide resolved
rustler_mix/lib/rustler/compiler.ex Outdated Show resolved Hide resolved
@evnu evnu force-pushed the macos-bail-if-missing-config branch 2 times, most recently from df976d3 to 2697b62 Compare March 17, 2022 11:38
@evnu evnu force-pushed the macos-bail-if-missing-config branch from 2697b62 to d5bd477 Compare March 17, 2022 18:15
@evnu
Copy link
Member Author

evnu commented Mar 18, 2022

I will merge this for now. @filmor and @rusterlium/core, I am open to reverting this if someone can think of a better strategy to handle linker arguments for macos.

@evnu evnu merged commit c2cff60 into rusterlium:master Mar 18, 2022
@evnu evnu deleted the macos-bail-if-missing-config branch March 18, 2022 06:41
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.

macOS platform hack does not pick up workspace cargo configuration
3 participants