Skip to content

Commit 8f3c096

Browse files
committed
build-all: Allow passing --host for cross compiling the tools
1 parent 06f44cd commit 8f3c096

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

build-all.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ set -e
1919
LLVM_ARGS=""
2020
MINGW_ARGS=""
2121
CFGUARD_ARGS="--enable-cfguard"
22+
HOST_ARGS=""
2223

2324
while [ $# -gt 0 ]; do
2425
case "$1" in
@@ -57,6 +58,9 @@ while [ $# -gt 0 ]; do
5758
--no-runtimes)
5859
NO_RUNTIMES=1
5960
;;
61+
--host=*)
62+
HOST_ARGS="$HOST_ARGS $1"
63+
;;
6064
*)
6165
if [ -n "$PREFIX" ]; then
6266
echo Unrecognized parameter $1
@@ -79,15 +83,15 @@ for dep in git cmake; do
7983
fi
8084
done
8185

82-
./build-llvm.sh $PREFIX $LLVM_ARGS
86+
./build-llvm.sh $PREFIX $LLVM_ARGS $HOST_ARGS
8387
if [ -z "$NO_LLDB" ] && [ -z "$NO_LLDB_MI" ]; then
84-
./build-lldb-mi.sh $PREFIX
88+
./build-lldb-mi.sh $PREFIX $HOST_ARGS
8589
fi
8690
if [ -z "$FULL_LLVM" ]; then
8791
./strip-llvm.sh $PREFIX
8892
fi
89-
./install-wrappers.sh $PREFIX
90-
./build-mingw-w64-tools.sh $PREFIX
93+
./install-wrappers.sh $PREFIX $HOST_ARGS
94+
./build-mingw-w64-tools.sh $PREFIX $HOST_ARGS
9195
if [ -n "$NO_RUNTIMES" ]; then
9296
exit 0
9397
fi

0 commit comments

Comments
 (0)