Skip to content

Commit 17464a7

Browse files
committed
Final cleanups
1 parent 66de5c6 commit 17464a7

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

src/ci/docker/dist-x86_64-musl/Dockerfile

+3-5
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ WORKDIR /build/
2121

2222
COPY scripts/musl-toolchain.sh /build/
2323
# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
24-
# TODO: Check what this issue is and if we can ignore it
2524
RUN CFLAGS="-Wa,-mrelax-relocations=no" \
2625
CXXFLAGS="-Wa,-mrelax-relocations=no" \
27-
bash musl-toolchain.sh x86_64-linux-musl && rm -rf build
26+
bash musl-toolchain.sh x86_64 && rm -rf build
2827

2928
COPY scripts/sccache.sh /scripts/
3029
RUN sh /scripts/sccache.sh
@@ -45,9 +44,8 @@ ENV HOSTS=x86_64-unknown-linux-musl \
4544
CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \
4645
CXX_x86_64_unknown_linux_musl=x86_64-linux-musl-g++
4746

48-
# CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER=musl-gcc \
49-
# CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_RUNNER="qemu-arm -L /musl-arm"
50-
47+
# Musl defaults to static libs but we need them to be dynamic for host toolchain.
48+
# The toolchain will produce static libs by default.
5149
ENV RUSTFLAGS="-C target-feature=-crt-static"
5250

5351
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/scripts/musl-toolchain.sh

+4-6
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ exit 1
1717
set -x
1818
}
1919

20-
TARGET=$1
21-
#ARCH=$1
22-
#TARGET=linux-musl-$ARCH
23-
ARCH=x86_64
20+
ARCH=$1
21+
TARGET=linux-musl-$ARCH
2422

2523
OUTPUT=/usr/local
2624
shift
@@ -33,8 +31,7 @@ hide_output make install TARGET=$TARGET OUTPUT=$OUTPUT
3331

3432
cd -
3533

36-
# Make musl binaries executable
37-
34+
# Install musl library to make binaries executable
3835
ln -s $OUTPUT/$TARGET/lib/libc.so /lib/ld-musl-$ARCH.so.1
3936
echo $OUTPUT/$TARGET/lib >> /etc/ld-musl-$ARCH.path
4037

@@ -50,6 +47,7 @@ if [ ! -d libunwind-release_$LLVM ]; then
5047
curl -L https://github.com/llvm-mirror/libunwind/archive/release_$LLVM.tar.gz | tar xzf -
5148
fi
5249

50+
# fixme(mati865): Replace it with https://github.com/rust-lang/rust/pull/59089
5351
mkdir libunwind-build
5452
cd libunwind-build
5553
cmake ../libunwind-release_$LLVM \

src/ci/docker/test-various/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ WORKDIR /build/
2727
COPY scripts/musl-toolchain.sh /build/
2828
RUN CFLAGS="-Wa,-mrelax-relocations=no" \
2929
CXXFLAGS="-Wa,-mrelax-relocations=no" \
30-
bash musl-toolchain.sh x86_64-linux-musl && rm -rf build
30+
bash musl-toolchain.sh x86_64 && rm -rf build
3131
WORKDIR /
3232

3333
COPY scripts/sccache.sh /scripts/

0 commit comments

Comments
 (0)