Restore the original path before building widl

When building on windows, the toolchain bin directory contains
prefixless wrappers named "gcc.exe" and "clang.exe", even though
the toolchain isn't functional yet at this stage. Restore the
original path before building widl.

A more complete solution might be to build widl first, before
adding the newly built toolchain to the path.
This commit is contained in:
Martin Storsjö committed 2019-06-28 00:12:10 +03:00
1 parent f80d067176
commit c89799c996
1 file changed
+5
+5
View File
@@ -30,6 +30,7 @@ fi
mkdir -p "$PREFIX"
PREFIX="$(cd "$PREFIX" && pwd)"
ORIGPATH="$PATH"
if [ -z "$HOST" ]; then
# The newly built toolchain isn't crosscompiled; add it to the path.
export PATH=$PREFIX/bin:$PATH
@@ -128,6 +129,10 @@ if [ -n "$SKIP_INCLUDE_TRIPLET_PREFIX" ]; then
ARCHS=x86_64
fi
# If building on windows, we've installed prefixless wrappers - these break
# building widl, as the toolchain isn't functional yet. Restore the original
# path.
export PATH=$ORIGPATH
cd mingw-w64-tools/widl
for arch in $ARCHS; do
mkdir -p build-$CROSS_NAME$arch