-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support aarch64-linux for docker on macos
- Loading branch information
Rob ODwyer
committed
Oct 4, 2023
1 parent
d7e3160
commit 6e42e7b
Showing
5 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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 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,2 @@ | ||
[target.aarch64-unknown-linux-gnu] | ||
linker = "aarch64-linux-gnu-gcc" |
This file contains 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,23 @@ | ||
FROM ubuntu:16.04 | ||
|
||
ARG TOOLCHAIN=nightly-2022-12-11 | ||
|
||
RUN apt-get update && apt-get install -y curl git gcc openjdk-8-jdk-headless gcc-aarch64-linux-gnu ca-certificates | ||
|
||
ENV PATH=$PATH:/rust/bin:/root/.cargo/bin | ||
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | ||
ENV CARGO_BUILD_TARGET=aarch64-unknown-linux-gnu | ||
ENV JNILIB_RUST_TARGET=aarch64-unknown-linux-gnu | ||
|
||
# Confirm that the JAVA_HOME var is set correctly | ||
RUN ls ${JAVA_HOME}/bin/java | ||
|
||
# Install rustup | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=${TOOLCHAIN} --profile=minimal && rustc --version | ||
RUN rustup component add rustfmt | ||
|
||
RUN rustup target add ${CARGO_BUILD_TARGET} | ||
|
||
# Workaround for https://github.com/rust-lang/cargo/issues/4133 | ||
# Linker tool needs to be specified explicitly | ||
COPY .cargo_config /root/.cargo/config |
This file contains 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 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