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

Consolidate Android cross-build setup for mono and coreclr #56622

Open
am11 opened this issue Jul 30, 2021 · 4 comments
Open

Consolidate Android cross-build setup for mono and coreclr #56622

am11 opened this issue Jul 30, 2021 · 4 comments

Comments

@am11
Copy link
Member

am11 commented Jul 30, 2021

The cross-build in :/eng/ requires user to pass -cross argument to :/build.sh and set ROOTFS_DIR environment variable.

During the native build, it relies on setup done by the scripts under :/eng/common/cross. We have multiple examples in our platform matrix ({os}-{arch}) which make use of this infrastructure.

Android, however, is at the odds. For coreclr, it uses setup from :/eng/common/cross/build-android-rootfs.sh and :/eng/common/cross/toolchain.cmake, but for mono it uses a different setup. The impact is that:

The cross-build in :/eng/ requires user to pass -cross argument to :/build.sh and set ROOTFS_DIR environment variable.

does not hold for "Android on mono", due to which it requires us to add a few exceptions in the build infra and need us to remember about this exceptional case. Another down side is that the coreclr Android setup gets stale every now and then because no CI leg is exercising it.

I am opening this issue to discuss what can be done to consolidate Android build on mono and coreclr without losing any flexibility and still adapt to -cross / CrossBuild infrastructure.

@am11
Copy link
Member Author

am11 commented Jul 30, 2021

@fanyang-mono
Copy link
Member

Thanks for opening this issue. More discussions could be found from this PR #55641

@ghost
Copy link

ghost commented Jul 30, 2021

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Issue Details

The cross-build in :/eng/ requires user to pass -cross argument to :/build.sh and set ROOTFS_DIR environment variable.

During the native build, it relies on setup done by the scripts under :/eng/common/cross. We have multiple examples in our platform matrix ({os}-{arch}) which make use this infrastructure.

Android, however, is at the odds. For coreclr, it uses setup from :/eng/common/cross/build-android-rootfs.sh and :/eng/common/cross/toolchain.cmake, but for mono it uses a different setup. The impact is that:

The cross-build in :/eng/ requires user to pass -cross and ROOTFS_DIR to ./build.sh.

does not hold for "Android on mono", due to which it requires us to add a few exceptions in the build infra and need us to remember about this exceptional case. Another down side is that the coreclr Android setup gets stale every now and then because no CI leg is exercising it.

I am opening this issue to discuss what can be done to consolidate Android build on mono and coreclr without losing any flexibility and still adapting the -cross / CrossBuild infrastructure.

Author: am11
Assignees: -
Labels:

area-Infrastructure

Milestone: -

@ghost
Copy link

ghost commented Jul 30, 2021

Tagging subscribers to 'arch-android': @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Issue Details

The cross-build in :/eng/ requires user to pass -cross argument to :/build.sh and set ROOTFS_DIR environment variable.

During the native build, it relies on setup done by the scripts under :/eng/common/cross. We have multiple examples in our platform matrix ({os}-{arch}) which make use this infrastructure.

Android, however, is at the odds. For coreclr, it uses setup from :/eng/common/cross/build-android-rootfs.sh and :/eng/common/cross/toolchain.cmake, but for mono it uses a different setup. The impact is that:

The cross-build in :/eng/ requires user to pass -cross and ROOTFS_DIR to ./build.sh.

does not hold for "Android on mono", due to which it requires us to add a few exceptions in the build infra and need us to remember about this exceptional case. Another down side is that the coreclr Android setup gets stale every now and then because no CI leg is exercising it.

I am opening this issue to discuss what can be done to consolidate Android build on mono and coreclr without losing any flexibility and still adapting the -cross / CrossBuild infrastructure.

Author: am11
Assignees: -
Labels:

area-Infrastructure, os-android

Milestone: -

@lambdageek lambdageek added the untriaged New issue has not been triaged by the area owner label Jul 30, 2021
@steveisok steveisok removed the untriaged New issue has not been triaged by the area owner label Jul 31, 2021
@steveisok steveisok added this to the Future milestone Jul 31, 2021
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this issue May 26, 2023
Build and runtime pack for linux-bionic (Android without the Java part).

I tried not to regress the existing CoreCLR Android build that is based on a crossrootfs (dotnet#56622) - the if's basically deal with that. Note that it's likely broken anyway (dotnet#66562).
MichalStrehovsky added a commit that referenced this issue May 27, 2023
Build and runtime pack for linux-bionic (Android without the Java part).

I tried not to regress the existing CoreCLR Android build that is based on a crossrootfs (#56622) - the if's basically deal with that. Note that it's likely broken anyway (#66562).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants