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

Remove cfg! directives in build.rs causing cross-compilation to fail #555

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

fabriziosestito
Copy link
Contributor

By bumping rustler to 0.29.0 in a project using rustler_precompiled, I realized that the cross-compilation of some targets fails.
For instance, when compiling rustler with cargo build --target=arm-unknown-linux-gnueabihf, the ulong_size is not picked up correctly.
This is because the build.rs is compiled by the host prior to being executed, so the cfg! macro refers to the host configuration.
This PR reverts the usage of the cfg! macro in favor of the CARGO_* env variables.

@fabriziosestito fabriziosestito changed the title Fix cfg directives in build.rs causing cross-compilation to fail Remove cfg! directives in build.rs causing cross-compilation to fail Jun 29, 2023
@filmor
Copy link
Member

filmor commented Jun 29, 2023

Thanks a lot, I didn't think of this when I was refactoring the script :)

@filmor filmor merged commit 37275ea into rusterlium:master Jun 29, 2023
filmor pushed a commit that referenced this pull request Jun 29, 2023
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