-
Notifications
You must be signed in to change notification settings - Fork 642
Add riscv64 build support #3192
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
File renamed without changes.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Arguments: | ||
| # IMAGE_ARCH - the architecture of the image [ amd64 | arm64v8 | riscv64 ] | ||
| # DOTNET_SDK_VERSION - the version of dotnet for the Cake script [ 8.0 | * ] | ||
| # TOOLCHAIN_VERSION - the version of the GCC toolchain [ 9 | * ] | ||
| # TOOLCHAIN_ARCH - the architecture of the GCC toolchain [ arm-linux-gnueabihf | aarch64-linux-gnu | riscv64-linux-gnu ] | ||
| # TOOLCHAIN_ARCH_SHORT - the short form architecture of the GCC toolchain [ armhf | arm64 ] | ||
| # FONTCONFIG_VERSION - the exact version of libfontconfig1 to use [ 2.13.1-2 | * ] | ||
|
|
||
| ARG IMAGE_ARCH=amd64 | ||
| FROM ${IMAGE_ARCH}/debian:12 | ||
|
|
||
| # Install the required packages | ||
| RUN apt-get update \ | ||
| && apt-get install -y \ | ||
| curl python3 git clang-19 ninja-build xz-utils \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install the cross-compilation GCC toolchain | ||
| ARG TOOLCHAIN_VERSION=12 | ||
| ARG TOOLCHAIN_ARCH=arm-linux-gnueabihf | ||
| ARG TOOLCHAIN_ARCH_SHORT=armhf | ||
| RUN apt-get update \ | ||
| && apt-get install -y \ | ||
| libstdc++-${TOOLCHAIN_VERSION}-dev-${TOOLCHAIN_ARCH_SHORT}-cross \ | ||
| libgcc-${TOOLCHAIN_VERSION}-dev-${TOOLCHAIN_ARCH_SHORT}-cross \ | ||
| binutils-${TOOLCHAIN_ARCH} \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Make the script more flexible and use "current" instead of the actual version | ||
| RUN ln -s /usr/${TOOLCHAIN_ARCH}/include/c++/${TOOLCHAIN_VERSION} /usr/${TOOLCHAIN_ARCH}/include/c++/current \ | ||
| && sed -i "s/\/usr\/${TOOLCHAIN_ARCH}\/lib\///g" /usr/${TOOLCHAIN_ARCH}/lib/libpthread.so || true \ | ||
| && sed -i "s/\/usr\/${TOOLCHAIN_ARCH}\/lib\///g" /usr/${TOOLCHAIN_ARCH}/lib/libc.so | ||
|
|
||
| # Install the cross-compilation skia build dependencies (fontconfig) | ||
| ARG FONTCONFIG_VERSION=2.15.0-2 | ||
| RUN (mkdir -p /skia-utils/libfontconfig1-dev \ | ||
| && cd /skia-utils/libfontconfig1-dev \ | ||
| && curl http://deb.debian.org/debian/pool/main/f/fontconfig/libfontconfig-dev_${FONTCONFIG_VERSION}_${TOOLCHAIN_ARCH_SHORT}.deb -L -o libfontconfig1-dev.deb \ | ||
| && ar vx libfontconfig1-dev.deb \ | ||
| && tar -xJvf data.tar.xz \ | ||
| && rm libfontconfig1-dev.deb \ | ||
| && cp -R usr/lib/*/* /usr/${TOOLCHAIN_ARCH}/lib/ \ | ||
| && cp -R usr/include/* /usr/${TOOLCHAIN_ARCH}/include/ ) | ||
| RUN (mkdir -p /skia-utils/libfontconfig1 \ | ||
| && cd /skia-utils/libfontconfig1 \ | ||
| && curl http://deb.debian.org/debian/pool/main/f/fontconfig/libfontconfig1_${FONTCONFIG_VERSION}_${TOOLCHAIN_ARCH_SHORT}.deb -L -o libfontconfig1.deb \ | ||
| && ar vx libfontconfig1.deb \ | ||
| && tar -xJvf data.tar.xz \ | ||
| && rm libfontconfig1.deb \ | ||
| && cp -R usr/lib/*/* /usr/${TOOLCHAIN_ARCH}/lib/ ) | ||
|
|
||
| # Install the .NET SDK | ||
| ARG DOTNET_SDK_VERSION=8.0 | ||
| ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1 | ||
| RUN curl https://dot.net/v1/dotnet-install.sh -L -o dotnet-install.sh \ | ||
| && bash dotnet-install.sh --channel ${DOTNET_SDK_VERSION} --install-dir /usr/share/dotnet --verbose \ | ||
| && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
| && rm dotnet-install.sh \ | ||
| && dotnet help \ | ||
| && dotnet --info | ||
|
|
||
| ENV CC=clang-19 CXX=clang++-19 | ||
|
|
||
| WORKDIR /work |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.