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

Upgrade mariner images to LLVM 16 #840

Merged
merged 3 commits into from
Apr 11, 2023
Merged

Upgrade mariner images to LLVM 16 #840

merged 3 commits into from
Apr 11, 2023

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented Apr 7, 2023

As per title, upgrades LLVM from 12.0.1 to 16.0.0. Because this version isn't available in the mariner repos, we build it from source on all platforms (whereas we used to get 12.0.1 from the repos for the amd64 image).

LLVM 16 is the first release that has started to use C++17 (previous releases were using C++14). At first this was causing the compiler-rt builds to fail, because not all C++17 features were available in the libstdc++ version that is installed in the rootfs (and no version supporting these features is available on xenial without using pinned packages from later releases). However, as long as we are careful to build only the compiler-rt library we need (profile), no C++ is required.

Contributes to dotnet/runtime#83428.

@sbomer
Copy link
Member Author

sbomer commented Apr 7, 2023

@janvorli @am11 PTAL

am11
am11 approved these changes Apr 8, 2023
Copy link
Member Author

Choose a reason for hiding this comment

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

crossdeps-builder has extra contents (mostly sources and intermediate build outputs) that shouldn't be included in the final image, so we use it to build llvm, then only copy what we need out of it (llvm binaries, compiler-rt profile shared lib). crossdeps-llvm is a shared base image for the other cross-ARCH images, since it has the llvm cross-compiler. It is only one layer on top of crossdeps. crossdeps is used as the base image for both crossdeps-llvm and crossdeps-builder.

Copy link
Member

@mthalman mthalman left a comment

Choose a reason for hiding this comment

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

Looks like src/cbl-mariner/2.0/cross/arm-alpine/Dockerfile is still referencing cbl-mariner-2.0-crossdeps-arm-local which should be updated to cbl-mariner-2.0-crossdeps-llvm-local

Copy link
Member Author

Choose a reason for hiding this comment

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

crossdeps-builder has extra contents (mostly sources and intermediate build outputs) that shouldn't be included in the final image, so we use it to build llvm, then only copy what we need out of it (llvm binaries, compiler-rt profile shared lib). crossdeps-llvm is a shared base image for the other cross-ARCH images, since it has the llvm cross-compiler. It is only one layer on top of crossdeps. crossdeps is used as the base image for both crossdeps-llvm and crossdeps-builder.

@sbomer
Copy link
Member Author

sbomer commented Apr 10, 2023

Oops, I thought I had fixed that. Thanks.

@sbomer
Copy link
Member Author

sbomer commented Apr 10, 2023

@agocke PTAL

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you

@sbomer
Copy link
Member Author

sbomer commented Apr 11, 2023

@mthalman please merge when you have a chance.

@mthalman mthalman merged commit ac313ee into dotnet:main Apr 11, 2023
sbomer added a commit to sbomer/dotnet-buildtools-prereqs-docker that referenced this pull request Apr 13, 2023
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.

4 participants