Automatically extract the clang version number when installing compiler-rt

This commit is contained in:
Martin Storsjö committed 2018-01-18 10:00:01 +02:00
1 parent 2e994e681c
commit 098f6750d7
3 files changed
+6 -5

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ RUN ./build-mingw-w64.sh $TOOLCHAIN_PREFIX
# Build compiler-rt # Build compiler-rt
COPY build-compiler-rt.sh . COPY build-compiler-rt.sh .
RUN ./build-compiler-rt.sh $TOOLCHAIN_PREFIX 6.0.0 RUN ./build-compiler-rt.sh $TOOLCHAIN_PREFIX
# Build C test applications # Build C test applications
WORKDIR /build WORKDIR /build
+1 -1
View File
@@ -11,5 +11,5 @@ PREFIX="$1"
./build-llvm.sh $PREFIX ./build-llvm.sh $PREFIX
./install-wrappers.sh $PREFIX ./install-wrappers.sh $PREFIX
./build-mingw-w64.sh $PREFIX ./build-mingw-w64.sh $PREFIX
./build-compiler-rt.sh $PREFIX 6.0.0 ./build-compiler-rt.sh $PREFIX
./build-libcxx.sh $PREFIX ./build-libcxx.sh $PREFIX
+4 -3
View File
@@ -2,17 +2,18 @@
set -e set -e
if [ $# -lt 2 ]; then if [ $# -lt 1 ]; then
echo $0 dest clang-version echo $0 dest
exit 1 exit 1
fi fi
PREFIX="$1" PREFIX="$1"
CLANG_VERSION="$2"
export PATH=$PREFIX/bin:$PATH export PATH=$PREFIX/bin:$PATH
: ${CORES:=4} : ${CORES:=4}
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}} : ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
CLANG_VERSION=$(basename $(dirname $(dirname $(dirname $($PREFIX/bin/clang --print-libgcc-file-name -rtlib=compiler-rt)))))
if [ ! -d compiler-rt ]; then if [ ! -d compiler-rt ]; then
git clone -b master https://github.com/llvm-mirror/compiler-rt.git git clone -b master https://github.com/llvm-mirror/compiler-rt.git
CHECKOUT=1 CHECKOUT=1