-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release binaries for x86_64-musl (#8668)
* Add release binaries for x86_64-musl This was requested in bytecodealliance/wasmtime-py#237 and shouldn't cost us too much in terms of CI resources and maintenance overhead. * Fix combining rustflags prtest:full
- Loading branch information
1 parent
7c29813
commit cc93e8f
Showing
5 changed files
with
33 additions
and
1 deletion.
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
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,17 @@ | ||
# Rust binaries need `libgcc_s.so` but ubuntu's musl toolchain does not have it. | ||
# Get it from alpine instead. | ||
FROM alpine:3.16 as libgcc_s_src | ||
RUN apk add libgcc | ||
|
||
# Use something glibc-based for the actual compile because the Rust toolchain | ||
# we're using is glibc-based in CI. | ||
FROM ubuntu:24.04 | ||
RUN apt-get update -y && apt-get install -y cmake musl-tools | ||
COPY --from=libgcc_s_src /usr/lib/libgcc_s.so.1 /usr/lib/x86_64-linux-musl | ||
|
||
ENV PATH=$PATH:/rust/bin | ||
|
||
# Note that `-crt-feature` is passed here to specifically disable static linking | ||
# with musl. We want a `*.so` to pop out so static linking isn't what we want. | ||
ENV RUSTFLAGS=-Ctarget-feature=-crt-static | ||
ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=musl-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
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