File tree 3 files changed +8
-12
lines changed
3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,9 @@ WORKDIR /build/
21
21
22
22
COPY scripts/musl-toolchain.sh /build/
23
23
# 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
25
24
RUN CFLAGS="-Wa,-mrelax-relocations=no" \
26
25
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
28
27
29
28
COPY scripts/sccache.sh /scripts/
30
29
RUN sh /scripts/sccache.sh
@@ -45,9 +44,8 @@ ENV HOSTS=x86_64-unknown-linux-musl \
45
44
CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \
46
45
CXX_x86_64_unknown_linux_musl=x86_64-linux-musl-g++
47
46
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.
51
49
ENV RUSTFLAGS="-C target-feature=-crt-static"
52
50
53
51
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
Original file line number Diff line number Diff line change @@ -17,10 +17,8 @@ exit 1
17
17
set -x
18
18
}
19
19
20
- TARGET=$1
21
- # ARCH=$1
22
- # TARGET=linux-musl-$ARCH
23
- ARCH=x86_64
20
+ ARCH=$1
21
+ TARGET=linux-musl-$ARCH
24
22
25
23
OUTPUT=/usr/local
26
24
shift
@@ -33,8 +31,7 @@ hide_output make install TARGET=$TARGET OUTPUT=$OUTPUT
33
31
34
32
cd -
35
33
36
- # Make musl binaries executable
37
-
34
+ # Install musl library to make binaries executable
38
35
ln -s $OUTPUT /$TARGET /lib/libc.so /lib/ld-musl-$ARCH .so.1
39
36
echo $OUTPUT /$TARGET /lib >> /etc/ld-musl-$ARCH .path
40
37
@@ -50,6 +47,7 @@ if [ ! -d libunwind-release_$LLVM ]; then
50
47
curl -L https://github.com/llvm-mirror/libunwind/archive/release_$LLVM .tar.gz | tar xzf -
51
48
fi
52
49
50
+ # fixme(mati865): Replace it with https://github.com/rust-lang/rust/pull/59089
53
51
mkdir libunwind-build
54
52
cd libunwind-build
55
53
cmake ../libunwind-release_$LLVM \
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ WORKDIR /build/
27
27
COPY scripts/musl-toolchain.sh /build/
28
28
RUN CFLAGS="-Wa,-mrelax-relocations=no" \
29
29
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
31
31
WORKDIR /
32
32
33
33
COPY scripts/sccache.sh /scripts/
You can’t perform that action at this time.
0 commit comments