-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jorge Prendes <[email protected]>
- Loading branch information
Showing
5 changed files
with
82 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ rustflags = [ | |
|
||
[target.'cfg(unix)'] | ||
runner = 'scripts/test-runner.sh' | ||
|
||
[profile.release] | ||
strip = "symbols" |
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,14 @@ | ||
[build] | ||
default-target = "x86_64-unknown-linux-musl" | ||
|
||
[target.aarch64-unknown-linux-musl] | ||
dockerfile = "cross/Dockerfile.musl" | ||
|
||
[target.x86_64-unknown-linux-musl] | ||
dockerfile = "cross/Dockerfile.musl" | ||
|
||
[target.aarch64-unknown-linux-gnu] | ||
dockerfile = "cross/Dockerfile.gnu" | ||
|
||
[target.x86_64-unknown-linux-gnu] | ||
dockerfile = "cross/Dockerfile.gnu" |
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,8 @@ | ||
ARG CROSS_BASE_IMAGE | ||
ARG CROSS_DEB_ARCH | ||
FROM $CROSS_BASE_IMAGE | ||
|
||
ARG CROSS_DEB_ARCH | ||
RUN dpkg --add-architecture ${CROSS_DEB_ARCH} && \ | ||
apt-get -y update && \ | ||
apt-get install -y pkg-config libseccomp-dev:${CROSS_DEB_ARCH} |
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,25 @@ | ||
ARG CROSS_BASE_IMAGE | ||
FROM $CROSS_BASE_IMAGE | ||
|
||
COPY --from=jorgeprendes420/apk-anywhere / / | ||
ENV MARCH=${CROSS_CMAKE_SYSTEM_PROCESSOR} | ||
RUN apk-init ${MARCH} ${CROSS_SYSROOT} | ||
|
||
# configure libsecccomp-rs to use static linking | ||
RUN apk-${MARCH} add libseccomp-static libseccomp-dev | ||
ENV LIBSECCOMP_LINK_TYPE="static" | ||
ENV LIBSECCOMP_LIB_PATH="${CROSS_SYSROOT}/lib" | ||
|
||
# configure wasmedge to link stdc++ statically | ||
RUN apk-${MARCH} add g++ | ||
ENV WASMEDGE_DEP_STDCXX_LINK_TYPE="static" | ||
ENV WASMEDGE_DEP_STDCXX_LIB_PATH="${CROSS_SYSROOT}/lib" | ||
|
||
# wasmedge (through llvm) needs some symbols defined in libgcc | ||
RUN mkdir /.cargo && cat <<'EOF' > /.cargo/config.toml | ||
[target.'cfg(target_env = "musl")'] | ||
rustflags = ["-Clink-arg=-lgcc"] | ||
EOF | ||
|
||
RUN apt-get -y update && \ | ||
apt-get install -y pkg-config |