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

lwt: auto detect Android from the compiler #854

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EduardoRFS
Copy link
Contributor

@EduardoRFS EduardoRFS commented May 3, 2021

At reason-mobile I try to keep all dune packages simple, by just adding -x android.arm64 on the CLI they ideally should build.

This implies that the package itself should be able to discover the OS, which is not the case for LWT. Because otherwise we need an external build script to detect which OS should or should not add a flag.

This PR aims to fix that in making so that if no android-target is provided on the CLI, it tries to detect from the compiler.

Comment on lines -46 to -41
["dune" "exec" "-p" name "src/unix/config/discover.exe" "--" "--save"
"--use-libev" "%{conf-libev:installed}%"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a problem when cross compiling from Linux desktop to any non libev platform, like Android or iOS.

But it shouldn't be needed as it is enabled by default if it is not Windows or Android

https://github.com/ocsigen/lwt/blob/master/src/unix/config/discover.ml#L417

@raphael-proust
Copy link
Collaborator

I've rebased on master to run against a more recent CI that's been fixed. This PR seems to have broken compilation on windows. Something about a missing .h file during discovery.

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