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

Add images with both "host" and "target" crossroots in one image. #913

Merged
merged 4 commits into from
Aug 21, 2023

Conversation

directhex
Copy link
Member

This is required in some cases - e.g. compiling node.js for ARM64/Alpine, and the ever-broken ARM64 runtime perf lane (where we need headers for ARM64 available alongside linkable libraries for AMD64, depending on the build phase).

As is, we've achieved the same result largely by accident in the pre-Mariner build images, where we have enough x64 in the host OS to link successfully, and the ARM64 files in the crossroot.

The precedent on this is #901 which fixed our Android cross-compiler builds, by offering both Android and $HOST in the same system

If at some point in the future we move from building on x64 to building on ARM64, we will need the equivalent images for that.

This is required in some cases - e.g. compiling node.js for ARM64/Alpine,
and the ever-broken ARM64 runtime perf lane (where we need headers for
ARM64 available alongside linkable libraries for AMD64, depending on
the build phase).

As is, we've achieved the same result largely by accident in the
pre-Mariner build images, where we have enough x64 in the host OS to link
successfully, and the ARM64 files in the crossroot.

The precedent on this is dotnet#901
which fixed our Android cross-compiler builds, by offering both Android
and $HOST in the same system

If at some point in the future we move from building on x64 to building
on ARM64, we will need the equivalent images for that.
@directhex
Copy link
Member Author

I've validated these images locally in dotnet/node#36 - I was able to cross-compile for Musl for the first time, and arm64 Ubuntu on Mariner without gross accidental functioning via the old Ubuntu images.

Co-authored-by: Matt Thalman <mthalman@microsoft.com>
@directhex directhex merged commit 3643cf3 into dotnet:main Aug 21, 2023
25 checks passed
"osVersion": "cbl-mariner2.0",
"tags": {
"cbl-mariner-2.0-cross-biarch-amd64-amd64-alpine-$(System:TimeStamp)-$(System:DockerfileGitCommitSha)": {},
"cbl-mariner-2.0-cross-biarch-amd64-amd64-alpine$(FloatingTagSuffix)": {}
Copy link
Member

@akoeplinger akoeplinger Aug 22, 2023

Choose a reason for hiding this comment

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

is the amd64-amd64 a typo? Or does it mean cross compiling from amd64 to amd64?

@directhex
Copy link
Member Author

directhex commented Aug 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants