Make widl default to prefix/include instead of prefix/target/include, for windows toolchains

In these setups, we already install headers into prefix/include, in
order to save diskspace.
This commit is contained in:
Martin Storsjö committed 2018-10-10 23:33:19 +03:00
1 parent f16867dd20
commit 3d1b15b01e
2 files changed
+27 -5

No files matched your search

+1 -1
View File
@@ -16,6 +16,6 @@ export HOST=$CROSS_ARCH-w64-mingw32
./build-llvm.sh $PREFIX
./strip-llvm.sh $PREFIX
./build-mingw-w64-widl.sh $PREFIX
./build-mingw-w64-widl.sh $PREFIX --skip-triplet-prefix
./install-wrappers.sh $PREFIX
./prepare-cross-toolchain.sh $NATIVE $PREFIX $CROSS_ARCH
+26 -4
View File
@@ -2,11 +2,18 @@
set -e
if [ $# -lt 1 ]; then
echo $0 dest
while [ $# -gt 0 ]; do
if [ "$1" = "--skip-triplet-prefix" ]; then
SKIP_TRIPLET_PREFIX=1
else
PREFIX="$1"
fi
shift
done
if [ -z "$PREFIX" ]; then
echo $0 [--skip-triplet-prefix] 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.
@@ -14,8 +21,15 @@ PREFIX="$1"
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
if [ -n "$HOST" ]; then
CONFIGFLAGS="--host=$HOST"
CONFIGFLAGS="$CONFIGFLAGS --host=$HOST"
CROSS_NAME=$HOST-
EXEEXT=.exe
fi
if [ -n "$SKIP_TRIPLET_PREFIX" ]; then
CONFIGFLAGS="$CONFIGFLAGS --with-widl-includedir=$PREFIX/include"
# If using the same prefix, it's enough to build one single binary.
ALL_ARCHS="$ARCHS"
ARCHS=x86_64
fi
cd mingw-w64/mingw-w64-tools/widl
@@ -27,3 +41,11 @@ for arch in $ARCHS; do
make install
cd ..
done
if [ -n "$SKIP_TRIPLET_PREFIX" ]; then
cd $PREFIX/bin
for arch in $ALL_ARCHS; do
if [ "$arch" != "$ARCHS" ]; then
ln -sf $ARCHS-w64-mingw32-widl$EXEEXT $arch-w64-mingw32-widl$EXEEXT
fi
done
fi