Add arm64 cross-build images targeting Ubuntu 16.04#754
Merged
mthalman merged 5 commits intodotnet:mainfrom Jan 17, 2023
Merged
Add arm64 cross-build images targeting Ubuntu 16.04#754mthalman merged 5 commits intodotnet:mainfrom
mthalman merged 5 commits intodotnet:mainfrom
Conversation
janvorli
reviewed
Jan 16, 2023
Member
The same happens for .NET crossbuild, so it is ok. It seems like these are compiler internal headers for intrinsics and few other things. |
mthalman
approved these changes
Jan 17, 2023
|
|
||
| In certain cases, it is necessary to run custom logic before and after the Dockerfiles are built. For example, to build the Dockerfiles that are used for cross-gen builds, the rootfs that gets copied into the Docker image needs to be built on the host OS. To support these scenarios a `pre-build` or `post-build` bash or PowerShell script can be placed in a `hooks` folder next to the Dockerfile. The scripts will get invoked by the build process. | ||
|
|
||
| Note that multi-stage docker builds can be used to accomplish the same without build hooks, and are easier to iterate on locally because this takes advantage of docker image caching to avoid re-running steps when nothing has changed (whereas pre-build hooks run every time the dockerfile is built). |
Member
There was a problem hiding this comment.
I like this. Hadn't looked closely at the original implementation to see that this could be improved. It was implemented before multi-stage Dockerfiles were even supported.
- Remove redundant toolchain option - Rename to BUILD_CXX_FLAGS - Indent cmake arguments
mthalman
approved these changes
Jan 17, 2023
janvorli
reviewed
Jan 17, 2023
janvorli
approved these changes
Jan 17, 2023
Member
Author
|
@mthalman @MichaelSimons would you mind merging this? I don't have permission. Thanks! |
This was referenced Jan 17, 2023
This was referenced Jan 19, 2023
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@janvorli @MichaelSimons PTAL. I can't seem to add reviewers directly.
This is adding an Ubuntu 20.04 image with an arm64 Ubuntu 16.04 rootfs that we can use to build against a lower glibc version than we currently support. The plan is to use this image at least for the .NET 7 part of dotnet/runtime#69361.
Locally, I've used these steps to build a container that can build coreclr with the
--pgoinstrumentargument. Without the profile library build, the build fails withBuilding this library and copying it into the rootfs fixes this.
@janvorli I would appreciate if you could also review the logs here to make sure everything looks ok: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_apis/build/builds/137325/logs/467. I started with instructions at https://llvm.org/docs/HowToCrossCompileLLVM.html and https://llvm.org/docs/HowToCrossCompileBuiltinsOnArm.html, then had to play around with the arguments and use a mix of CMAKE variables and flags like
--sysroot(-DCMAKE_SYSROOTwas not working as I expected). The logs show that/usr/lib/llvm-9/lib/clang/9.0.1/includeis still being used as an include path - I am not sure if this is a problem, so I'd appreciate your eyes on this.