1 # Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2 # file at the top-level directory of this distribution and at
3 # http://rust-lang.org/COPYRIGHT.
5 # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 # option. This file may not be copied, modified, or distributed
9 # except according to those terms.
16 echo ERROR: An error was encountered with the build.
21 bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
34 git clone https://github.com/richfelker/musl-cross-make -b v0.9.7
37 hide_output make -j$(nproc) TARGET=$TARGET
38 hide_output make install TARGET=$TARGET OUTPUT=$OUTPUT
43 export CXX=$TARGET-g++
47 # may have been downloaded in a previous run
48 if [ ! -d libunwind-release_$LLVM ]; then
49 curl -L https://github.com/llvm-mirror/llvm/archive/release_$LLVM.tar.gz | tar xzf -
50 curl -L https://github.com/llvm-mirror/libunwind/archive/release_$LLVM.tar.gz | tar xzf -
55 cmake ../libunwind-release_$LLVM \
56 -DLLVM_PATH=/build/llvm-release_$LLVM \
57 -DLIBUNWIND_ENABLE_SHARED=0 \
58 -DCMAKE_C_COMPILER=$CC \
59 -DCMAKE_CXX_COMPILER=$CXX \
60 -DCMAKE_C_FLAGS="$CFLAGS" \
61 -DCMAKE_CXX_FLAGS="$CXXFLAGS"
63 hide_output make -j$(nproc)
64 cp lib/libunwind.a $OUTPUT/$TARGET/lib
65 cd ../ && rm -rf libunwind-build