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:
1 parent
0c24f99adb
commit
fb4862b0d6
4 files changed
+33
-11
No files matched your search
Executable
+29
@@ -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
|
||||
Reference in new issue
Block a user