Split out building widl to a separate shell script

When cross compiling a llvm-mingw toolchain, we need to build widl
for the intended host environment as well.
This commit is contained in:
Martin Storsjö committed 2018-10-02 21:34:54 +03:00
1 parent 0c24f99adb
commit fb4862b0d6
4 files changed
+33 -11

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ RUN ./install-wrappers.sh $TOOLCHAIN_PREFIX && \
rm -rf /build rm -rf /build
# Build MinGW-w64, compiler-rt and mingw-w64's extra libraries # Build MinGW-w64, compiler-rt and mingw-w64's extra libraries
COPY build-mingw-w64.sh build-compiler-rt.sh build-mingw-w64-libraries.sh ./ COPY build-mingw-w64.sh build-mingw-w64-widl.sh build-compiler-rt.sh build-mingw-w64-libraries.sh ./
RUN ./build-mingw-w64.sh $TOOLCHAIN_PREFIX && \ RUN ./build-mingw-w64.sh $TOOLCHAIN_PREFIX && \
./build-compiler-rt.sh $TOOLCHAIN_PREFIX && \ ./build-compiler-rt.sh $TOOLCHAIN_PREFIX && \
./build-mingw-w64-libraries.sh $TOOLCHAIN_PREFIX && \ ./build-mingw-w64-libraries.sh $TOOLCHAIN_PREFIX && \
+1 -1
View File
@@ -37,7 +37,7 @@ COPY install-wrappers.sh .
RUN ./install-wrappers.sh $TOOLCHAIN_PREFIX RUN ./install-wrappers.sh $TOOLCHAIN_PREFIX
# Build MinGW-w64 # Build MinGW-w64
COPY build-mingw-w64.sh . COPY build-mingw-w64.sh build-mingw-w64-widl.sh ./
RUN ./build-mingw-w64.sh $TOOLCHAIN_PREFIX RUN ./build-mingw-w64.sh $TOOLCHAIN_PREFIX
# Build compiler-rt # Build compiler-rt
+29
View File
@@ -0,0 +1,29 @@
#!/bin/sh
set -e
if [ $# -lt 1 ]; then
echo $0 dest
exit 1
fi
PREFIX="$1"
# Not adding $PREFIX/bin to $PATH here, since that is expected to be
# a cross toolchain; the compiler is expected to be in $PATH already here.
: ${CORES:=4}
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
if [ -n "$HOST" ]; then
CONFIGFLAGS="--host=$HOST"
CROSS_NAME=$HOST-
fi
cd mingw-w64/mingw-w64-tools/widl
for arch in $ARCHS; do
mkdir -p build-$CROSS_NAME$arch
cd build-$CROSS_NAME$arch
../configure --prefix=$PREFIX --target=$arch-w64-mingw32 $CONFIGFLAGS INSTALL="install -s"
make -j$CORES
make install
cd ..
done
+2 -9
View File
@@ -63,12 +63,5 @@ for arch in $ARCHS; do
done done
cd .. cd ..
cd mingw-w64-tools/widl cd ..
for arch in $ARCHS; do ./build-mingw-w64-widl.sh "$PREFIX"
mkdir -p build-$arch
cd build-$arch
../configure --prefix=$PREFIX --target=$arch-w64-mingw32 INSTALL="install -s"
make -j$CORES
make install
cd ..
done